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
commitbcfa6779640b217d300234d57f7e2172e656c0ea (patch)
treeb349103905973b4a01669f7eaa54437c3a2ff98c
parent0a6bffc116dc86aad606eaf8eb6eaccbd3ae5c2f (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 c9ca3770..6e0e07e3 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