Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when symbol_in_winbar is used with an unsupported kind #1419

Open
fent opened this issue Apr 8, 2024 · 0 comments
Open

error when symbol_in_winbar is used with an unsupported kind #1419

fent opened this issue Apr 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@fent
Copy link

fent commented Apr 8, 2024

Describe the bug

The propietary LSP I'm using is returning a kind value that is not in Lspsaga. The kind returned has a value of 0, not on this list:
https://github.com/nvimdev/lspsaga.nvim/blob/a4d442896a9ff1f83ee3db965d81b659ebc977d5/lua/lspsaga/lspkind.lua

and so I'm getting the following error

Error detected while processing CursorMoved Autocommands for "<buffer=1>":
Error executing lua callback: ...-demo/plugins/lspsaga.nvim/lua/lspsaga/symbol/winbar.lua:99: attempt to index a nil value
stack traceback:
        ...-/plugins/lspsaga.nvim/lua/lspsaga/symbol/winbar.lua:99: in function 'insert_elements'
        ...-/plugins/lspsaga.nvim/lua/lspsaga/symbol/winbar.lua:128: in function 'find_in_node'
        ...-/plugins/lspsaga.nvim/lua/lspsaga/symbol/winbar.lua:153: in function 'render_symbol_winbar'
        ...-/plugins/lspsaga.nvim/lua/lspsaga/symbol/winbar.lua:249: in function <...-demo/plugins/lspsaga.nvim/lua/lspsaga/symbol/winbar.lua:245>

Steps to reproduce

It's hard since you'd have to get your LSP to return a kind not in https://github.com/nvimdev/lspsaga.nvim/blob/a4d442896a9ff1f83ee3db965d81b659ebc977d5/lua/lspsaga/lspkind.lua

Expected behavior

Show the items in winbar even without the icons, or have a default icon to show.

Neovim version (nvim -v)

v0.9.4

lspsaga commit

a4d4428

Terminal name/version

alacritty/0.13.1

@fent fent added the bug Something isn't working label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant