Only spellcheck comments and text nodes in HTML #118
Comments
The way that spell-check is currently implemented, no. It either checks a grammar (and everything in it) or it doesn't. |
Any particular time-frame when we can expect this feature released ? |
|
I have same problem, except that with LaTeX files. What would it require to fix this? |
+1, any solution to ignore all HTML/XML style tags (perfect or not) is welcome :) |
I'd like to thank you for your excellent plugin. I suppose it was not a trivial undertaking. On the other hand, not checking spelling e.g. esp. inside of tags is probably a natural evolution of this. I don't suppose the extra underlining really stops me from editing HTML files as I'd like; so I suppose it needn't be high priority. That being said, probably most mature editors behave this way. Thus, I look forward to the day when you might elect to do this, or another spelling plugin writer does this. |
Perhaps this could be implemented by allowing more than one level of scope in the grammars list? Like, for example, instead of just supporting "source.js" (and checking everything in js files) you could support "source.js string.quote.double.js" (the top level scope and then a subscope separated by a space or other character). The plugin would check each scope as it drilled into the element to check. |
So as not to multiply work for the programmer, consider how it's used. Quoted string are passed along by a language parser, whether they are misspelled or not. Same with text in HTML tags. If a tag element is wrong, you can quickly see that there is not syntax highlighting; and languages will generate syntax or link errors. We wouldn't necessarily expect any CSS designations would be recognized; so there's no point spell-checking them, unless we are validating them against a style-sheet - which isn't really spell-checking. Let's not multiply the number of different grammar categories unduly. Perhaps text and string constants, language elements is one, and let the user pick which they want checked; perhaps for each language. My guess is 2-4 broad categories should do. |
I've added
text.html.basic
to the grammar config option so HTML files are spellchecked, but it looks like it spellchecks everything including tag names and attributes which leads to a bunch of unnecessary red underlines throughout the document. I don't need it constantly warning me<ul>
and the like is spelled wrong.Sublime's spellcheck had the functionality where it ignored the spelling of HTML tags and only checked text nodes and comments. I've searched without success for ways to do this in Atom... is it possible at all?
The text was updated successfully, but these errors were encountered: