Lexers bundled with modules? #38
jugglerchris
started this conversation in
General
Replies: 1 comment 1 reply
-
It's not documented, but you can do something similar to what Textadept does[1]. For example:
events.connect(events.BUFFER_NEW, function()
buffer:private_lexer_call(_SCINTILLA.functions.load_lexer_library[1], '/path/to/lexers')
end)
In theory that should give every buffer access to your lexer directory. I haven't tested this beyond a simple call to confirm that it works initially.
[1]: https://github.com/orbitalquark/textadept/blob/c5aa8f8dec9611828b6972bc1a72cc8571eab36a/init.lua#L337
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a module (textadept-vi), and would like to include some lexers with it (to use with buffers containing compiler errors or grep output, for example - not things normally considered languages). Is that possible? From the documentation it looks like lexers have to be in
~/.textadept/lexers/
- I can copy or add symlinks, but that makes it harder to install.Or can I include lexers with a module (e.g. any
lexers
directory underpackage.path
ormodules/foo/lexers
, ...), or even generate it programmatically (lexers.foo = ...
in the code)?Thanks!
Chris
Beta Was this translation helpful? Give feedback.
All reactions