SmiteshP / nvim-navbuddy

A simple popup display that provides breadcrumbs feature using LSP server
Apache License 2.0
770 stars 30 forks source link

Issue when there are more than one LSP #29

Closed AckslD closed 1 year ago

AckslD commented 1 year ago

I just tried this out and works really nice when there is a single LSP. However in python I use both pyright and jedi for different capabilities and then I get the following error after choosing which one to use in the popup.

E5108: Error executing lua: ....local/share/nvim/lazy/nvim-navic/lua/nvim-navic/lib.lua:257: attempt to call field 'request' (a nil value)
stack traceback:
    ....local/share/nvim/lazy/nvim-navic/lua/nvim-navic/lib.lua:257: in function 'request_symbol'
    ...share/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/init.lua:166: in function 'make_request'
    ...share/nvim/lazy/nvim-navbuddy/lua/nvim-navbuddy/init.lua:157: in function 'on_submit'
    ...el/.local/share/nvim/lazy/nui.nvim/lua/nui/menu/init.lua:281: in function <...el/.local/share/nvim/lazy/nui.nvim/lua/nui/menu/init.lua:275>

Edit: using lsp = {preference = {'pyright'}} in the settings does work.

AckslD commented 1 year ago

I manually attach to each server. For my case I just want to use pyright for this anyway (I only use jedi for hover since it gives better docstrings) so for me setting lsp = {preference = {'pyright'}} or only attaching for pyright works but still wanted to flag the error.

SmiteshP commented 1 year ago

Should be fixed in latest commit 👍🏽

AckslD commented 1 year ago

Can confirm :rocket: