[ZeroBrane Studio] Re: Handling different extension as Lua files
- From: Paul K <paul@xxxxxxxxxxxxx>
- To: zerobrane@xxxxxxxxxxxxx
- Date: Thu, 31 Jan 2019 09:14:46 -0800
Hi Mattes,
Is there a setting somewhere, or some other trick, to make ZBS treat
those files as native Lua files, too?
Yes, you can use `editor.specmap.foo = "lua"` in the config to link
the extension (foo) to the lexer (lua). This applies to all the lexers
(not just Lua). Here is the link to the complete ext-to-lexer mapping:
https://github.com/pkulchenko/ZeroBraneStudio/blob/master/src/config.lua#L32.
There is another option available for Lua files (as shown in the
sample config:
https://github.com/pkulchenko/ZeroBraneStudio/blob/master/cfg/user-sample.lua#L15),
but the one above is more generic and applies to any supported lexer
(including those that can be loaded dynamically from a plugin).
I'll check to make sure it's covered in the documentation.
Paul.
Other related posts: