summaryrefslogtreecommitdiff
path: root/lua/plugins/textobject-lexer.lua
AgeCommit message (Collapse)Author
2024-05-30Fail silently when syntax has no lexerMichiel van den Heuvel
This'll patch vis.lexers.load to return nil when the lexer could not be found. Previously it would've errored out, which the load in lexer.lua still will as this is used in lexers themselves. Another possibility is to only patch set_syntax in vis.lua and the WIN_HIGHLIGHT handler in vis-std.lua, but as most references to vis.lexers.load already handle a nil return, this seems better.
2018-01-22lua: fix theme loading when lexer module is not availableMarc André Tanner
The color settings are currently stored in the `vis.lexers` table, make sure it is not nil even when loading the lexer module (or one of its dependencies e.g. lpeg) failed.
2017-03-31lexers: sync with scintillua changeset 600 rev fdeca0b808bfMarc André Tanner
I think the default value for the cache argument to the lexer load function should be true, not false. Optimize for the common case. This makes the API ugly/harder to use. But for now we follow upstream.
2017-03-02lua: fix luacheck warnings in pluginsMarc André Tanner
2017-03-01lua: return nil for invalid text objectsMarc André Tanner
2016-12-08vis-lua: add optional help parameter to mapping functionsMarc André Tanner
2016-12-07lua: move non-core code out of vis.luaMarc André Tanner
The following structure is adapted: * visrc.lua entry point for all Lua code * vis.lua only implements the Lua part of the core API * vis-std.lua registers standard event handlers (e.g. syntax highlighting, statusbar handling, theme changes etc). It is sourced from vis.lua. * plugins/* non essential editor functionality, needs to be explicitly enabled by loading it from visrc.lua