Sublime Forum

Extend syntax definition from User folder

#1

Today I tried to extend the syntax file for Haskell programs, as it’s missing a few things (specifically pragmas and integer/float literals).
Now obviously I could modify the Haskell.tmLanguage file in the Haskell folder, but that means the file could be overwritten by a future Sublime version, plus backing up all my changes becomes more complex than just copying the User folder.
I tried making a new Haskell.tmLanguage file in the User folder, but that seemed to have no effect.
Is there any way of extending/overwriting a syntax definition from the User folder?

Thanks in advance.

0 Likes

#2

Your best bet is to create a syntax definition file with a new name, perhaps ‘Haskell Enhanced’, and then associate *.hs files with that syntax (Click on the syntax entry in the status bar and choose ‘Open all with current extension as…’).

0 Likes