I'm really loving Github's Atom editor! However, there is one thing on which I get stuck.
I am sometimes struggeling to get code-comments without spelling mistakes. Therefore I like my editor to run a spell-check on the comments (e.g. such as Geany does). However I haven't got this working in Atom.
Let's use Python code as example. I've tried to enable the spell-check by adding:
text.python, text.py
to the "Grammars" field of the spell-check package. However no spell-check appears to be running for Python code. Also google was not helpfull...
The spellcheck attribute specifies whether the element is to have its spelling and grammar checked or not. The following can be spellchecked: Text values in input elements (not password) Text in <textarea> elements.
For example, to enable spell check in PHP files, go to installed packages and search "PHP". You'll see language-php core package, open it and look for the line "Scope: text.html.php." That's what you need to insert in spell-check settings. Do the same for any other type of file where you need spelling to be checked.
It's frustrating that such simple option need so many clicks to be turned on. It really should be just as simple as it is in Sublime Text.
EDIT:
Deleted the broken link, even though it didn't hurt the answer.
Spell check in Atom must be enabled by adding scopes per language. Navigate to spell-check settings and add scopes in the grammars field, like this:
source.asciidoc, source.gfm, text.git-commit, text.plain, text.plain.null-grammar, text.html.basic, source.css.scss, text.html.php, source.css, source.js, source.json
Scope name is the solution. add source.python for python. For any other languages do this,
You can find the scope name of a particular grammar by:
Open a file that uses that grammar Open the Developer Tools (View > Developer > Toggle Developer Tools) Switch to the Console tab Place the cursor anywhere in the file in question 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With