simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.17k stars 160 forks source link

Where are user commands actually getting defined? (None are available for me) #409

Closed jeanlucthumm closed 1 year ago

jeanlucthumm commented 1 year ago

Where are these commands actually getting defined so that you can use them:

https://github.com/simrat39/rust-tools.nvim/blob/0cc8adab23117783a0292a0c8a2fbed1005dc645/lua/rust-tools/lsp.lua#L29

Seems like it's just constructing a table, and for the life of me I can't find any code that actually uses this table.

I'm running into an issue where none of these commands are available for some reason and I'm trying to debug.

jeanlucthumm commented 1 year ago

Nevermind, figured it out, it's here:

https://github.com/simrat39/rust-tools.nvim/blob/0cc8adab23117783a0292a0c8a2fbed1005dc645/lua/rust-tools/lsp.lua#L30

And these get passed to nvim-lspconfig here:

https://github.com/simrat39/rust-tools.nvim/blob/0cc8adab23117783a0292a0c8a2fbed1005dc645/lua/rust-tools/lsp.lua#L170

However, there was a bug in nvim-lspconfig that was preventing the commands from getting registered in my case:

https://github.com/neovim/nvim-lspconfig/issues/2731