mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
Problem: Current `'includeexpr'` in runtime/ftplugin/lua.vim doesn't work with Nvim Lua. Solution: Provide an improved 'includeexpr' for Lua in "ftplugin/lua.lua". Closes: https://github.com/neovim/neovim/issues/32490
11 lines
367 B
Lua
11 lines
367 B
Lua
-- use treesitter over syntax
|
|
vim.treesitter.start()
|
|
|
|
vim.bo.includeexpr = 'v:lua.require"vim._ftplugin.lua".includeexpr()'
|
|
vim.bo.omnifunc = 'v:lua.vim.lua_omnifunc'
|
|
vim.wo[0][0].foldexpr = 'v:lua.vim.treesitter.foldexpr()'
|
|
|
|
vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '')
|
|
.. '\n call v:lua.vim.treesitter.stop()'
|
|
.. '\n setl omnifunc< foldexpr< includeexpr<'
|