ray-x / navigator.lua

Code analysis & navigation plugin for Neovim. Navigate codes like a breeze🎐 Exploring LSP and 🌲Treesitter symbols a piece of 🍰 Take control like a boss 🦍
MIT License
1.29k stars 58 forks source link

Fixes for various problems relating to treesitter interactions and upstream changes #300

Closed ahorine closed 8 months ago

ahorine commented 8 months ago

This should fix #299 as well.

When trying to view treesitter symbols (e.g. via :TSymbols) no results would appear in the side panel due to the treesitter nodes now being located in a subtable in the query results. Fixed via drilling down into the subtable ("local") before processing the node types.

When using the (deprecated) reference request - default <leader>gr - there would be errors regarding nil references due to some undefined variables being used as parameters. Simply defining them wasn't sufficient either, as further down the callstack (inside treesitters parser code) there's functions that aren't allowed to be run inside the async loop routines. I ended up taking all of that out and just calling warmup_treesitter directly, as the async_ref version of this command should be used anyway.

I also quickly went through and replaced the rest of the direct references to vim.loop with vim.uv (if available) that seemed to have been missed the first time around.