Giter VIP home page Giter VIP logo

cspell-dicts's Introduction

cspell-dicts

Various cspell dictionaries. Each dictionary is its own package. See README.md in each directory.

Language Dictionaries

Programming Dictionaries

Specialized Dictionaries

Contributing

Please help correct any mistakes in the dictionaries.

See: Contributing

How to create a new dictionary

Please fork this repository to add new dictionaries.

Install Yarn

Installation | Yarn

Using Yeoman script

The Yeoman script can help you create the dictionary template files seen in most of dictionary directories.

Running the generator

In the cspell-dicts repository root.

yarn create-dictionary <name> <path/to/source/words>

Yeoman will ask you a series of questions:

Field Description
name this is the dictionary. i.e. en_AU or ruby
friendly name this is the friendly name, like Australian
description short description of the dictionary.
source file this is the source file to use to build the dictionary. It can be a .txt or hunspell .dic file. This file will be copied to the dictionary project.
local this is the two letter language code with an optional cultural code. a * mean it will match any language. More than one local can be added by separating them with a comma. i.e. en, en_AU.
languageId this is the VS Code programming language id or file type. * will match all file types. Examples: java, cpp, plaintext, markdown, ruby. Types know to cspell
store as trie for large source files (> 1MB) or hunspell files, this should be y. n will work for all programming language keyword files.
run build prepare the word list so it can be used by cspell efficiently. You can always run the build step yourself in the dictionary directory yarn run build.

Once all the questions have been answered, the dictionary directory will be created and the files will be copied.

Please update README.md and LICENSE files as necessary.

Testing Dictionaries

Smoke test

Linking

From the dictionary directory

cspell link add ./cspell-ext.json

This will add an entry in the cspell global config to import the cspell-ext.json file in the dictionary directory.

Use either VS Code or cspell to verify that files spell check correctly.

Verify with cspell
  • Install cspell: npm install -g cspell
  • Check the global links: cspell link list
  • Check a file: cspell check <path/to/source/file.ext> [--local=<locale>] [--language-id=<filetype>] Example: cspell check README.md --local=en,es -- to check the readme file assuming English and Spanish words.

Checking a file will show you what has been ignored (gray) as well as what is considered an error (red):

image

Clean up

Remember to unlink when you are done:

cspell link remove ./cspell-ext.json

npm Global Install

From the dictionary directory:

npm install -g

From NPM repository:

npm install -g @cspell/dict-<name>

Then run the link command found in the dictionary README.md file. It has the following pattern: cspell link add @cspell/dict-<name>. To unlink: cspell link remove @cspell/dict-<name>

cspell-dicts's People

Contributors

abdusabri avatar aleksi avatar anthony0030 avatar awgeorge avatar babyraging avatar bentolor avatar canarduck avatar crapstone avatar d2s avatar dependabot[bot] avatar dflock avatar dwenegar avatar hdahlheim avatar inwardmovement avatar jakezatecky avatar jason3s avatar jordiolivares avatar karlhorky avatar karolis2011 avatar kissaki avatar mad-gooze avatar majid110 avatar merlijn-sebrechts avatar miodju avatar ndac-todoroki avatar nschonni avatar pzmarzly avatar tas50 avatar verythorough avatar viktorstrate avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.