hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
8.16k stars 407 forks source link

feat: Refactor compare.scopes #2007

Open pynappo opened 4 months ago

pynappo commented 4 months ago

On nvim-treesitter main, some of the methods used in cmp's compare.scopes now error instead of returning an empty table when no tree-sitter parser exists (specifically, locals.get_*). This implements a basic fix.

Leaving it as a draft because:

Edit: This PR has also turned into an overhaul of compare.scopes:

edit2: I can also revert the renaming of the variables if you'd like, I just did it out of my preference when I was changing the function around