aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/lua.lua
Commit message (Collapse)AuthorAge
* feat(treesitter)!: remove g:ts_highlight_lua (#22257)Christian Clason2023-02-15
| | | | | | | | | | | | | | | | This variable was only meant for easy testing during the development cycle for treesitter highlighting while Lua was the only parser useable for daily driving. Now that we have a good vimdoc parser, this approach simply doesn't scale and should be removed sooner rather than later. Instead of setting this variable, people for now should add the autocommand directly to their config: ```lua vim.api.nvim_create_autocmd('FileType', { pattern = 'lua', -- or { 'lua', 'help' } callback = function() vim.treesitter.start() end, }) ``` (or put `vim.treesitter.start()` in an `ftplugin`).
* feat(treesitter): add vim.treesitter.start(), enable for LuaChristian Clason2022-09-06
* Add vim.treesitter.start() for starting treesitter highlighting via ftplugin or autocommand (can be extended later for fold, indent, matchpairs, ...) * Add vim.treesitter.stop() for manually stopping treesitter highlighting * Enable treesitter highlighting for Lua if `vim.g.ts_highlight_lua = true` is set in `init.lua`