SublimeText / jQuery

Sublime Text package bundle for jQuery
323 stars 98 forks source link

Syntax highlighting stopped working #22

Closed JosteinSydnes closed 9 years ago

JosteinSydnes commented 9 years ago

After updating Sublime text 3 to build 3083 the syntax highlighting for jQuery stopped working, i can select it and the code hinting works but no colors show in the code, what can i do to fix it?

mrmartineau commented 9 years ago

the package was recently updated, could you check you are running the latest version by running the 'Upgrade/Overwrite all packages' command in Sublime.

JosteinSydnes commented 9 years ago

thanks for you quick reply. Just tried it and still the same issue.

mrmartineau commented 9 years ago

can you make sure that you are using the Javascript (jQuery) syntax? Check the bottom-right of your sublime window to see..

JosteinSydnes commented 9 years ago

Hmm, mine says jQuery(Javascript), i am on a mac.

mrmartineau commented 9 years ago

Sorry, you have it right. I can't explain why yours isn't working. Will need to investigate

JosteinSydnes commented 9 years ago

ok, thanks for you assistance so far, here is what i have tried so far:

JodiWarren commented 9 years ago

I am also having the same issue as @Oyvind-Eikeland, and have tried the same things suggested. I am on the Dev Channel, build 3084, OSX Yosemite.

JodiWarren commented 9 years ago

FWIW, installing Javascript Ultimate has fixed this problem for me.

mrmartineau commented 9 years ago

@JodiWarren I updated the code recently after the dev of JavascriptUltimate contacted me. I didn't realise this would not work without that package.. If that's the case, I will fix the bug or revert because I don't think this should rely on that package.

JodiWarren commented 9 years ago

Probably worth a try - I tried installing it after seeing your commit message mentioning it. I haven't tried it with your previous commits. FWIW I inspected with Scope Hunter with and without Javascript Ultimate installed.

On a var (for example):

With JSUltimate I get:

source.js.dom
storage.type.js

Without, I get: source.js.dom.jquery

That's all I get for nearly everything. The only exceptions with highlighting are the following:

Type of thing Addition to the scope
jQuery constants support.constant.js.jquery
jQuery functions support.function.js.jquery
Dollar signs on selectors punctuation.section.class.js
Text inside selectors meta.selector.jquery
meta.selector.css
entity.other.attribute-name.class.css

Let me know if there are any other useful tests I can do

franciscolourenco commented 9 years ago

+1 It wasn't working until I installed Javascript Ultimate

mrmartineau commented 9 years ago

cc @joshuawise

JosteinSydnes commented 9 years ago

Thank you @JodiWarren, installing Javascript Ultimate fixed the problem.

JoshuaWise commented 9 years ago

This isn't what I was experiencing when I was testing the solution I suggested to @mrmartineau, but there is no doubt a solution that doesn't rely on JavaScript Ultimate. I'll take a look at it tonight.

mrmartineau commented 9 years ago

Thanks @JoshuaWise

JoshuaWise commented 9 years ago

I added a pull request with a fix for this issue.

jiayouzl commented 9 years ago

After updating Sublime text 3 to build 3092 the syntax highlighting for jQuery stopped working, i can select it and the code hinting works but no colors show in the code, what can i do to fix it?

JoshuaWise commented 9 years ago

Sublime Text 3 seems to be going through some flux about how they handle syntax definitions. People using the edge/developer builds right now will no doubt experience issues in the category. If you must use the edge build, try installing or removing JavaScript Ultimate. That may solve your problem for the time being.

mrmartineau commented 9 years ago

Hi all, what would you say if I removed the syntax definition? I have just done this on my HTML5 package to fix bugs as it seems there are too many conflicts with these packages and the default ones. Sublime's default syntax defs or some of the other more specialised ones (Javascript Ultimate or Babel) are better suited anyway..

Please let me know and I will do this soon..

JoshuaWise commented 9 years ago

When you say "removed the syntax definition", do you mean, reduce your package to only providing snippets/auto-completes?

mrmartineau commented 9 years ago

Yes, exactly.

JodiWarren commented 9 years ago

I’ve just gone through about 10 different files, testing each one with both the default ST 3 (latest version) Javascript syntax definition and the jQuery syntax definition, and I couldn’t find an noticeable difference. So I can’t personally see any problem with you removing it.

On 19 Jul 2015, at 23:03, Zander Martineau notifications@github.com wrote:

Yes, exactly.

— Reply to this email directly or view it on GitHub https://github.com/SublimeText/jQuery/issues/22#issuecomment-122710089.

mrmartineau commented 9 years ago

Thanks @JodiWarren, I think I'm just gonna remove it. There's no real benefit these days.

Vahanbarsamian commented 6 years ago

Just i had the same issue, just change in "view" ->"Syntax" the "javascript" to" javascript ultimate" language

Thom1729 commented 6 years ago

@Vahanbarsamian These days, you should probably use Sublime's built-in JavaScript highlighting. It should have the most accurate support for standard JavaScript — and if it doesn't, let me know and I'll fix it.

JavaScript Ultimate claims to be “More accurate to the JavaScript specification”, but it's not clear what the author is referring to, and he hasn't responded to my request for clarification.