| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
#32597
This reverts commit f398e3a61abbf802b49867d2f533be1b0725c0d7.
|
|
|
|
|
|
|
|
|
|
| |
Problem:
- Many other ftplugin have defined 'omnifunc', but the Lua one doesn't
define one, even though there is `vim.lua_omnifunc()`
- Users may want "stupid" completion to fix Lua config with
`nvim --clean` in case they breaks it
Solution:
Set 'omnifunc' to 'v:lua.vim.lua_omnifunc' in ftplugin/lua.lua
|
|
|
|
| |
- Don't assume b:undo_ftplugin is set when first modifying it.
- Don't assume b:undo_ftplugin already contains some resetting.
|
|
|
|
|
|
| |
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 '|'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`).
|
|
* 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`
|