Sublime Forum

Syntax highlighting js

#1

Hello
i have a problem that suddenly occurred
syntax highlighting for javascript stopped working it is not even recognizing javascript file it recognize it as plain text and i can’t find the javascript type in the list of syntax types (bottom right menu)
i downloaded a lot of packages that any of them could be the problem but i almost removed them all and the problem still exist


any help ??

0 Likes

#2

Sublime ships with a JavaScript syntax directly, so if you’re not seeing it in the menu (and it doesn’t appear that you do, since it would be under Java), the first thing I would do to trouble shoot is open your user preferences and check to ensure that you didn’t accidentally add JavaScript to the ignored_packages setting. If it’s in the list, then removing it from there and saving the file should resolve the problem.

0 Likes

#3

i checked , it is not in the ignored_packages only vintage in there

0 Likes

#4

i didn’t found javascript.sublime-package in the packages folder so i tried to make one … i downloaded the javascript package folder from the github repository and i zipped it and renamed it but now i’m getting this error

0 Likes

#5

The version of the package that ships with Sublime is tucked away in a folder in the Sublime install location, which is why you may not have been able to find it (unless that’s where you were looking). If the package is not in the list of ignored packages and also not in that folder, something untoward has happened.

It looks like you’re using Windows; are you using a portable installation?

0 Likes

#6

i found the folder where all the packages in the install location and that’s where i was looking in and couldn’t find it, i really don’t know what may have happened to remove the default package but i think it is one of the autocomplete packages that i installed
i’m using window yes and not a portable installation

0 Likes

#7

In that case a reinstall may be in order just to be safe; all of your configuration and installed packages will be left alone (even if you uninstall and then reinstall), but it will replace any shipped packages that may have dissapeared themselves.

0 Likes

#8

Problem solved
After many restarts, Sublime read the .sublime-package file that I’ve made
Thank you

0 Likes