mattstratton / language-hugo

Hugo syntax highlighting in Atom
https://atom.io/packages/language-hugo
MIT License
17 stars 6 forks source link

Spellchecking doesn't work with hugo files #13

Open lichtner opened 6 years ago

lichtner commented 6 years ago

Hi, if I set in Atom file type for *.md file "GitHub Markdown" then I see underlined misspelled words with a red line but If I set file type "Hugo" for the same file, spellchecking disappeared.

Is it possible to add support for spellchecking for this package?

Thanks.

clozach commented 5 years ago

I was having this issue as well and finally figured out the solution, l thanks to this tip from jcolemorrison and a cursory read of the spell-check docs.

TL;DR

Add text.html.hugo to Settings > Packages > spell-check > Grammars

From the spell-check docs

To enable Spell Check for your current file type: put your cursor in the file, open the Command Palette (cmd-shift-p), and run the Editor: Log Cursor Scope command. This will trigger a notification which will contain a list of scopes. The first scope that's listed is the one you should add to the list of scopes in the settings for the Spell Check package. Here are some examples: source.coffee, text.plain, text.html.basic.

Needless to say, cmd-shift-p in a doc set to Hugo syntax gives text.html.hugo. :)