neovim/runtime/ftplugin/lua.lua
zeertzjq 12c9791e0f
fix(runtime): stop treesitter highlight in b:undo_ftplugin (#29533)
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 '|'.
2024-07-03 15:24:12 +08:00

5 lines
137 B
Lua

-- use treesitter over syntax
vim.treesitter.start()
vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | call v:lua.vim.treesitter.stop()'