Spell checking for Python comments only


#1

Hi there,

I’m curios if it’s possible to setup a specific scope for the Python language to have spell checking active on single line comments and comment blocks only?

I successfully added the Python itself (‘source.python’) to the checking scope, but with this everything got checked.

I already figured out with the ‘Scope at Cursor’ tool, that there are actually different scopes for comments (e.g. ‘string.quoted.single.block.sql.python’), but adding this to the scope list in the spell-check package results in nothing is checked in a Python file anymore.

So is there another way to limit the checking for Python?

Thanks,
Peter


#2

The spell-check package currently only supports checking based on what grammar is loaded for a file, not on individual scopes like comments.


#3

Hi Lee,

thanks for letting me know. Is another package capable of doing so? Something like https://atom.io/packages/linter-spell ?

Thanks,
Peter


#4

I don’t know of a package specifically that does. That doesn’t mean that one doesn’t exist though :grinning: