kosayoda / nvim-lightbulb

VSCode 💡 for neovim's built-in LSP.
MIT License
783 stars 27 forks source link

how to activate #44

Closed DartMitai closed 1 year ago

DartMitai commented 1 year ago

hi everyone, I'm new to this, I copied the configuration example and the light bulb is shown, but how do I activate it? clicking the mouse does not give why, do you need some kind of keyboard shortcut? now there is no light bulb...

kosayoda commented 1 year ago

To display available code actions (the lightbulb shows that there are actions available), you have to run the [vim.lsp.buf.code_action()](https://neovim.io/doc/user/lsp.html#vim.lsp.buf.code_action()) function. You can bind it to a key for easier triggering.

DartMitai commented 1 year ago

To display available code actions (the lightbulb shows that there are actions available), you have to run the [vim.lsp.buf.code_action()](https://neovim.io/doc/user/lsp.html#vim.lsp.buf.code_action()) function. You can bind it to a key for easier triggering.

after entering the command, I get a lot of text, there is no such pop-up window with a choice as in the video example Снимок экрана от 2022-11-20 07-30-24

DartMitai commented 1 year ago

forgive me for the stupid questions and thank you very much for helping, here is my full config https://gitflic.ru/project/dartmitai/neovim

kosayoda commented 1 year ago

The :h vim.lsp.buf.code_action() you ran runs the help command, (:h is shortcut for :help), which shows you the documentation for the command. You can run the code action command using :lua vim.lsp.buf.code_action().

For further help, please visit the neovim project's chat instead at their matrix room instead.

DartMitai commented 1 year ago

please show the telescope-ui-select settings, I installed it and copied the code from the documentation, but when calling the command :lua vm.ls.buf.code_action(), it still doesn't open the telescope Снимок экрана от 2022-11-21 22-50-50