summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <xyz@flylightning.xyz>2026-05-01 23:58:57 +0800
committerXiao Pan <xyz@flylightning.xyz>2026-05-03 01:58:42 +0800
commit22736255110a55ca11b79b6a23aa6f0d047e25a7 (patch)
tree15f219a5ea0b705e2ae3910f2ba8c5f38a196b95
parent23d09936551aec7d7789a6d736a99c9063815e34 (diff)
nvim workaround .md high CPU usage
neovim high CPU usage when editing markdown file with many lines, e.g., more than 100 lines, can be workarounded with :lua vim.treesitter.stop() https://github.com/neovim/neovim/discussions/39277
-rw-r--r--home/xyz/.config/nvim/init.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/home/xyz/.config/nvim/init.vim b/home/xyz/.config/nvim/init.vim
index 8e46c012..5f734ff5 100644
--- a/home/xyz/.config/nvim/init.vim
+++ b/home/xyz/.config/nvim/init.vim
@@ -114,6 +114,11 @@ augroup mycmd
if has('nvim')
autocmd! nvim.swapfile
autocmd SwapExists * let v:swapchoice = 'o'
+ " neovim high CPU usage when editing markdown file with many lines,
+ " e.g., more than 100 lines, can be workarounded with :lua
+ " vim.treesitter.stop()
+ " https://github.com/neovim/neovim/discussions/39277
+ autocmd FileType markdown lua vim.treesitter.stop()
endif
augroup END