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:41 +0800
commitf38f79565791afdfd6df49979b1a212948171165 (patch)
treea67962d2889b65fa2f90f8a1760f9949dd374bb7
parent5d13a9670927fbc8868294b0a075df65e584eced (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