I’m developing a Prolog interpreter which is callable from Lua. I use ZBS as my IDE and I’d like to edit Prolog source files and see syntax highlighting, as works in Lua and XML and JSON…
I see in the ZBS (2.00) distribution that there is already a Prolog lexer defined, but looking at plug-in examples, I’m completely at a loss as to how to activate it for files with specific extensions (.pro and .pl)
Guidance much appreciated, I’m running under MacOS.
I’ve looked at my user configuration file to see where there might be a place to do this, but it’s not obvious to me at all.
The default configuration only links the lexer to the .prolog extension, but you can add more by setting a specmap
value to whatever you need. In this case you can set editor.specmap.pro = "prolog"
in user.lua
to link .pro
extension to the prolog
lexer (and similar for .pl
).