Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Only spellcheck comments and text nodes in HTML #118

Open
scferg opened this issue Feb 29, 2016 · 9 comments
Open

Only spellcheck comments and text nodes in HTML #118

scferg opened this issue Feb 29, 2016 · 9 comments

Comments

@scferg
Copy link

scferg commented Feb 29, 2016

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?

@lee-dohm
Copy link
Contributor

The way that spell-check is currently implemented, no. It either checks a grammar (and everything in it) or it doesn't.

@IvanDimanov
Copy link

Any particular time-frame when we can expect this feature released ?

@RyanZim
Copy link

RyanZim commented Jun 2, 2016

@lee-dohm?

Any particular time-frame when we can expect this feature released ?

@ghost
Copy link

ghost commented Jul 7, 2016

I have same problem, except that with LaTeX files.

What would it require to fix this?

@philip
Copy link

philip commented Aug 23, 2016

+1, any solution to ignore all HTML/XML style tags (perfect or not) is welcome :)

@metasean
Copy link

related to #19 (which I would vote up but it's locked because people were making +1 comments - now that github supports emoji's it would be nice to have that one unlocked so (a) dups like this and #126 don't keep being opened and (b) developers can better gauge community desires)

@BugZappr
Copy link

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.

@tustin2121
Copy link

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.

@BugZappr
Copy link

BugZappr commented Feb 2, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants