brainfucksec / neovim-lua

Neovim KISS configuration with Lua
GNU General Public License v3.0
826 stars 116 forks source link

Some lspconfig keymaps not working #13

Closed ggteixeira closed 2 years ago

ggteixeira commented 2 years ago

Hi! First of all, congrats for your project. I'm currently migrating from Vimscript to Lua using mostly your repo as a template! It works pretty well out of the box!

However, if you don't mind, could you help me understand why some lspconfig keymaps aren't working? Keymaps such as: buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts), for example.

It's a weird behavior because they do work if I call them manually; but doesn't work whenever I call them by the keymap provided by lspconfig.

Do you have any hints? Sorry for using your issues sections; it was the less intrusive way to contact you

ggteixeira commented 2 years ago

UPDATED: I just uninstalled and installed again some servers using lspinstall and suddenly it started working. Magic happens!

brainfucksec commented 2 years ago

However, the keymaps configuration for nvim-lspconfig can be found in the nvim/lua/core/plugins/nvim-lspconfig.lua and not in the nvim/lua/core/keymaps.lua, the keys are the defaults shown in the nvim-lspconfig wiki. Also this plugin is constantly evolving, you should check this wiki sometimes :)

ggteixeira commented 2 years ago

I'll make sure my configs are constantly updated! Thank you for the tips!

brainfucksec commented 2 years ago

You're welcome. good work.