How to enable spell checking for another language


I am trying to enable spell checking for the ‘language-latex’ package, but I can’t figure out how to do it. I tried adding the name (LaTeX), to the list of languages in the spellcheck configuration but that did not seem to be the required magic.


Also looking into this. I can get it to spell check .hbs files.


You have to add the scope name to the list of grammars that the spell check package checks:

You can find the scope name of a particular grammar by:

  1. Open a file that uses that grammar
  2. Open the Developer Tools (View > Developer > Toggle Developer Tools)
  3. Switch to the Console tab
  4. Place the cursor anywhere in the file in question
  5. Open the Command Palette and execute the command Editor: Log Cursor Scope

An array of strings will be logged, the first item in the array is the scope name for that grammar.


Thanks @leedohm, that did the trick :smiley:


Is the text added into “Grammar” field appended to the default configuration or does it replace the default?


It replaces the default. All settings fields in Atom work this way, to my knowledge.


Is it possible to automatically enable spell-cheking for a custom language-* package, so end users of the package won’t need to manually edit this setting?


Not really, no. A language package could on activation check the spell-check.grammars configuration value and update it but:

  1. It is bad form to edit configuration values that aren’t yours
  2. I would be upset if a language package decided for me whether that language should be spell checked


Agree with both points, it can be the unexpected behaviour for most of the language packages. However, I’m interested particularly for language-asciidoc package, I believe most of its users expect spell-checking enabled by default as well as Markdown users. Sent a PR.


Note for latex, the grammar identifier is text.tex.latex.


Can the scope be more specific than everything related to that grammar?

Ie, if I have these scopes:

Scopes at Cursor

I want to limit spell checking to comments (in only. I tried these options:

X comment


CTRL+SHIFT+ALT+P would log the scope of the cursor also.


On Windows or Linux, yes. On OS X it is Alt+Cmd+P.