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-01 23:59:15 +0800
commit852c9c8c68aae2a8643bc38d6e71360374c3335e (patch)
tree1be36b1f5f286b9b1ff32d60fa5d2fa85b918300
parenta72bcdcffd0b977833113469da59a915e718d5da (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 573f21b1..bab86f65 100644
--- a/home/xyz/.config/nvim/init.vim
+++ b/home/xyz/.config/nvim/init.vim
@@ -118,6 +118,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