User defined language seems to support only one extension
-
Hello,
I have constructed support for a user defined language. It is for Clojure and it supports de clj extension. If I add another extension, it does not highlight syntax for that one. E.g. cljs.

What can I possibly do wrong?
André
-
It supports multiple extensions just fine. I use that every day (with
md markdownmeaningblah.mdandblah.markdownboth get markdown highlighting). Andclj cljswould be the right syntax for doing multiple extensions.
The UDL extension recognition only applies when you first create or open a file – if you already had the
blah.cljsfile open as “Normal text” when you edited the UDL, you would have to close the file and reopen (Ctrl+W, Ctrl+Shift+T), at which point it should see that it has the right extension, and use the UDL syntax highlighting. If that’s not it, you’ll have to give a bit more info. -
Re-opening the file in Notepad++ did the trick indeed. As far as I remember I stopped and re-started Notepad++ but that didn’t help.
Thanks,
André
-
As far as I remember I stopped and re-started Notepad++
Notepad++ saved it’s current language for that file (plain text) in the session config, then used that saved session config when you restarted. (This is a critical feature when one extension can have multiple meanings, and you have overridden the default language for a particular file)
OTOH, if you close the file, Notepad++ discards meta-information, like what language was previously served, and so re-applies its internal rules and will see the UDL extension when you re-open the file.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login