Skip to content
This repository has been archived by the owner on Nov 11, 2018. It is now read-only.

Breaks jshint and refactor packages #8

Open
pajtai opened this issue Sep 5, 2014 · 5 comments
Open

Breaks jshint and refactor packages #8

pajtai opened this issue Sep 5, 2014 · 5 comments
Labels

Comments

@pajtai
Copy link

pajtai commented Sep 5, 2014

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.

@pajtai pajtai changed the title Breaks jshint and git packages Breaks jshint and refactor packages Sep 5, 2014
@p-e-w p-e-w added the bug label Sep 6, 2014
@Duder-onomy
Copy link

This happens to me to. +1

@dead-claudia
Copy link

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?

@dead-claudia
Copy link

Correction: file it on atom/atom.

@p-e-w
Copy link
Owner

p-e-w commented Dec 7, 2014

@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.

@dead-claudia
Copy link

@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.

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

No branches or pull requests

4 participants