Closed mariusju closed 1 year ago
in config, when we enable "command_enable", just like default config, LspUI will auto register command like LspUI hover
LspUI code_action
etc
you can just add this in lspconfig on_attach
(This will only trigger bind keypresses when the lsp is mounted on the buffer)
just like this:
local opt = { noremap = true, silent = true }
vim.api.nvim_buf_set_keymap("n", "<leader>ca", "<cmd>LspUI code_action<CR>", opt)
here is my keybinding file, https://github.com/jinzhongjia/neovim-config/blob/lsp/lua/plugin-config/mason/lsp/keybind.lua
oh, i didn't realize that I had to enable commands when using just the defaults. Works like a charm, thanks again ❤️
Hi! first of all - thanks for creating this plugin. I arrived at it exactly for the same problem - every time I need to setup my nvim environment, lsp saga is broken for different reasons, I just cant afford wasting time on that over and over. Looking forward to try LspUI.
I am not an advanced nvim+lua user, I coudln't figure out how to bind commands from your docs. Could you give me an example, lets say how to bind code_actions command to
<leader>ca
?Thank you!