From 8f5e90811025bcc652146168d5116f8d73fe8f81 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 1 Jul 2024 17:48:09 +0800 Subject: fix(runtime): update b:undo_ftplugin in Lua runtime files (#29529) Related to #29506, but adding vim.treesitter.stop() to b:undo_ftplugin doesn't solve the problem yet. --- runtime/ftplugin/c.lua | 2 +- runtime/ftplugin/cs.lua | 2 ++ runtime/ftplugin/d.lua | 2 ++ runtime/ftplugin/glsl.lua | 2 ++ runtime/ftplugin/help.lua | 2 ++ runtime/ftplugin/query.lua | 2 ++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/runtime/ftplugin/c.lua b/runtime/ftplugin/c.lua index 2695b642aa..6e68df18d0 100644 --- a/runtime/ftplugin/c.lua +++ b/runtime/ftplugin/c.lua @@ -11,4 +11,4 @@ if vim.fn.isdirectory('/usr/include') == 1 then ]]) end -vim.b.undo_ftplugin = vim.b.undo_ftplugin .. '|setl path<' +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | setl path<' diff --git a/runtime/ftplugin/cs.lua b/runtime/ftplugin/cs.lua index f398d66a63..0f90644f11 100644 --- a/runtime/ftplugin/cs.lua +++ b/runtime/ftplugin/cs.lua @@ -1 +1,3 @@ vim.bo.commentstring = '// %s' + +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | setl commentstring<' diff --git a/runtime/ftplugin/d.lua b/runtime/ftplugin/d.lua index f398d66a63..49a8702986 100644 --- a/runtime/ftplugin/d.lua +++ b/runtime/ftplugin/d.lua @@ -1 +1,3 @@ vim.bo.commentstring = '// %s' + +vim.b.undo_ftplugin = 'setl commentstring<' diff --git a/runtime/ftplugin/glsl.lua b/runtime/ftplugin/glsl.lua index f398d66a63..49a8702986 100644 --- a/runtime/ftplugin/glsl.lua +++ b/runtime/ftplugin/glsl.lua @@ -1 +1,3 @@ vim.bo.commentstring = '// %s' + +vim.b.undo_ftplugin = 'setl commentstring<' diff --git a/runtime/ftplugin/help.lua b/runtime/ftplugin/help.lua index 86e181504f..0628a3e9ca 100644 --- a/runtime/ftplugin/help.lua +++ b/runtime/ftplugin/help.lua @@ -30,3 +30,5 @@ end vim.keymap.set('n', 'gO', function() require('vim.vimhelp').show_toc() end, { buffer = 0, silent = true }) + +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | nunmap gO' diff --git a/runtime/ftplugin/query.lua b/runtime/ftplugin/query.lua index c75dc30430..499619e36f 100644 --- a/runtime/ftplugin/query.lua +++ b/runtime/ftplugin/query.lua @@ -33,3 +33,5 @@ end -- it's a lisp! vim.cmd([[ runtime! ftplugin/lisp.vim ]]) + +vim.b.undo_ftplugin = vim.b.undo_ftplugin .. ' | setl omnifunc< iskeyword<' -- cgit