Sublime Forum

Error loading syntax file: Expected key end

#1

I’m using Sublime Text 3. It was working fine until today.

I tried to change the Haskell syntax highlighting rules. To this end, I unzipped the Haskell.sublime-package file, modified the Haskell.tmLanguage file inside it, rezipped it, and then restarted Sublime Text 3.

Since then, I’ve been getting this error message every time I run it:

and of course Haskell code is no longer syntax highlighted.

I have changed the file back to its exact original state. I have even reinstalled Sublime Text 3 anew. I have also re-unzipped the file to check that it’s still the original version that it has always been and it is.

Why do I keep getting this error even though the file is the same file that has previously always been working?

(I installed Sublime Text 3 into the folder D:\Sublime and the file I am referring to is D:\Sublime\Packages\Haskell.sublime-package.)

0 Likes

#2

I’ve now uninstalled and completely wiped all of Sublime (including all of its settings in C:\Users\Timwi\Appdata\Roaming\Sublime Text 3) and reinstalled afresh and the error is still happening!.. Please help…

0 Likes

#3

I managed to solve this by using the Portable version instead. Not an elegant solution, but works I guess…

0 Likes

#4

How did you verify it was exactly the same file? Diff? If it was just a visual inspection, you could have still missed something. Try copying the sublime-package file from the portable version into the Packages folder. Additionally, you may want to try entering "sublime.executable_path()` in the ST console to make sure you are inspecting the correct path for the package. Finally, you shouldn’t modify the package file directly, as it is possible it will be overridden in future updates. It also causes some issues when trying to revert back. Instead, you should leverage the file override capability of ST3. I can explain it if you want, but you can also use github.com/skuroda/PackageResourceViewer to do it. Open the file through that, making some modification, and saving will place it in the proper location to override the package file you opened.

0 Likes