Open pajtai opened 10 years ago
This happens to me to. +1
It's because this creates a whole new grammar for semantic highlighting, which should be wholly unnecessary. I don't know enough about how this package works, or I would file an Atom bug myself. @p-e-w, could you file an informed bug on atom/highlights for this? Specifically on hooks for semantic highlighters?
Correction: file it on atom/atom.
@impinball: Semantic highlighting does require full text parsing and, as such, a grammar. There is just no shortcut here. My guess is that the reason jshint and refactor-js fail is actually that this package uses the grammar name js-semantic
rather than simply js
like the default JavaScript grammar that ships with Atom.
@p-e-w I meant that it currently requires a full grammar, but the fact it does is probably a design oversight with Atom.
You are very likely correct in that those packages break because this labels itself as an alternate grammar.
I wonder if it would be possible to overwrite the native js
grammar with a third party plugin. If so, that would be awesome. If not, then getting such a feature added to Atom might be the way to fix this. (Semantic highlighting could break most themes because they aren't semantic highlighting schemes, something to take into account.) Another way might be to allow aliases of grammars that supercede grammar selection (i.e. is checked for first), although this probably complicates an already notably slow editor.
So far, my initial toying around suggests it is impossible to overwrite native grammars, but I don't know a lot about Atom plugin development.
I really like this package, but enabling it breaks jshint
To repro first install:
Make sure they work. Now enable this package and note that jshint no longer highlights and refactor no longer is able to select variables or refactor.