From 12c9791e0fef7ee0d6cf6d3b828caa488d6347ea Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 3 Jul 2024 15:24:12 +0800 Subject: 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 '|'. --- runtime/ftplugin/help.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/ftplugin/help.lua') diff --git a/runtime/ftplugin/help.lua b/runtime/ftplugin/help.lua index 0628a3e9ca..6e643c967f 100644 --- a/runtime/ftplugin/help.lua +++ b/runtime/ftplugin/help.lua @@ -31,4 +31,5 @@ vim.keymap.set('n', 'gO', function() require('vim.vimhelp').show_toc() end, { buffer = 0, silent = true }) +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | call v:lua.vim.treesitter.stop()' vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | nunmap gO' -- cgit