andymass / vim-matchup

vim match-up: even better % :facepunch: navigate and highlight matching words :facepunch: modern matchit and matchparen. Supports both vim and neovim + tree-sitter.
https://www.vim.org/scripts/script.php?script_id=5624
MIT License
1.68k stars 70 forks source link

Errors with latest nightly neovim #360

Closed augustocdias closed 1 week ago

augustocdias commented 1 week ago

My matchup config:

vim.g.matchup_matchparen_offscreen = { method = 'popup' }
vim.g.matchup_transmute_enabled = true

This is causing this error to pop off a lot in the latest nightly of neovim:

E5108: Error executing lua ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:66: attempt to call method 'type' (a nil value)
stack traceback:
    ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:66: in function '_node_id'
    ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:112: in function 'fn'
    ...im/lazy/nvim-treesitter/lua/nvim-treesitter/ts_utils.lua:380: in function 'get_active_nodes'
    ...vim/lazy/vim-matchup/lua/treesitter-matchup/internal.lua:221: in function 'get_delim'
    [string "luaeval()"]:1: in main chunk
Error detected while processing CursorMoved Autocommands for "*"..function 3[3]..4[71]..matchup#delim#get_current[1]..<SNR>70_get_delim_multi[3]..matchup#ts_engine#get_delim[3]..<SNR>62_forward:
Gu1nness commented 1 week ago

I'm also affected by this :)

catgoose commented 1 week ago

https://github.com/neovim/neovim/commit/6913c5e1d975a11262d08b3339d50b579e6b6bb8

kuntau commented 1 week ago

Totally unusable right now, had to disable vim-matchup for now :(

dpobel commented 1 week ago

@kuntau https://github.com/andymass/vim-matchup/pull/358 seems to fix the issue (even if according to the comments it does not seem to be the correct way to fix it) so while this is properly fixed you can use the corresponding fork and branch as a workaround

augustocdias commented 1 week ago

Totally unusable right now, had to disable vim-matchup for now :(

You can just rollback the neovim version to a previous commit or to the latest stable...

catgoose commented 1 week ago

Totally unusable right now, had to disable vim-matchup for now :(

git clone https://github.com/neovim/neovim.git
cd neovim
git checkout 318c041
sudo make distclean && sudo make CMAKE_BUILD_TYPE=Release && sudo make install