HiPhish / rainbow-delimiters.nvim

Rainbow delimiters for Neovim with Tree-sitter
https://gitlab.com/HiPhish/rainbow-delimiters.nvim
Apache License 2.0
465 stars 34 forks source link

[Bug]: slow down in markdown #106

Open 0rtz opened 3 months ago

0rtz commented 3 months ago

Neovim version

0.9.5

Language affected

markdown

Query

No response

Strategy

No response

Description

Hello. I'm experiencing lags on big markdown files containing a lot of code blocks, when using rainbow-delimiters plugins. 

minimal `init.vim`:

let g:my_plug_dir = $HOME . '/.tmp/init.vim-debug'
if !filereadable(g:my_plug_dir . '/autoload/plug.vim')
    silent execute '!curl -fLo '.g:my_plug_dir.'/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
    execute 'source ' . g:my_plug_dir . '/autoload/plug.vim'
end

call plug#begin(g:my_plug_dir . '/vim-plug')
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdateSync'}
Plug 'hiphish/rainbow-delimiters.nvim'
call plug#end()

if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
    echom 'Some modules are missing, running :PlugInstall'
    PlugInstall
endif

lua <<EOF
    require'nvim-treesitter.configs'.setup {
        auto_install = true,
        highlight = {
            enable = true,
        },
    }
EOF
0rtz commented 3 months ago

Example of markdown file in which problem occurs: test.md

E.g. when i try to delete any line with dd operator insinde test.md noticeable delay occurs. Unfortunately, i do not know how to measure this delay in neovim.

HiPhish commented 3 months ago

Can you please post one of those markdown files? It could be an issue with too many different languages or too many code blocks.

0rtz commented 3 months ago

@HiPhish I did post it in the comment above

HiPhish commented 3 months ago

Sorry, I missed the comment.