aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/lua.lua
Commit message (Collapse)AuthorAge
* fix(runtime): treat b:undo_ftplugin consistently in Lua ftplugins (#30473)zeertzjq2024-09-23
| | | | - Don't assume b:undo_ftplugin is set when first modifying it. - Don't assume b:undo_ftplugin already contains some resetting.
* fix(runtime): stop treesitter highlight in b:undo_ftplugin (#29533)zeertzjq2024-07-03
| | | | | | It seems that nvim-treesitter stops treesitter highlight when changing filetype, so it makes sense for builtin ftplugins to do this as well. Use :call and v:lua here to allow separation with '|'.
* feat(treesitter): highlight Lua files by default (#26824)Christian Clason2024-01-01
|
* 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`