1

I am switching over from Emacs, Doom Emacs specifically. It had a very nice feature where you could just press M-x and then start typing the command you're looking for and it will fuzzy find it for you. It also showed the key combination next to it though that's not as important to me.

I am trying to do the same with Telescope, but Neovim works a little differently. There are no "commands" per se, but functions that you can call. Is there a way I can search over all the functions available? e.g. if I want to call vim.lsp.buf.hover() or some other function like that.

I do sometimes use :Telescope keymaps. It does do what I'm asking for but only if a keymap exists for the function I'm looking for.

3 Answers 3

3

If you are searching for lsp symbols you can do:

:Telescope lsp_document_symbols

enter image description here

enter image description here

For this to work you need to have Neovim LSP framework to be connected to the corresponding LSP server.

In order to do that I recommend to install:

That require:

You can then install the LSP server for Python with the Neovim command: :MasonInstall pyright

2
  • Three answers to one question? I'm impressed. Vi stands for Vivian, doesn't it? :-)
    – Friedrich
    Apr 24, 2023 at 7:27
  • I don't know Emacs and I'm not sure what the OP wants to achieve: code completion, command completion or searching symbol :-| Apr 24, 2023 at 7:51
1

If you would like to get a menu for Vim command you could do:

:set wildmenu
:set wildoptions=pum

enter image description here

Obtained by typing :set wildtab

see the following answer.

If you like it you may like even more the wilder plugin.

2
  • I don't think this is what I was asking for. But thanks a lot Apr 23, 2023 at 20:01
  • Are you searching for buffer functions or Vim commands? Apr 23, 2023 at 20:03
0

If you are searching for code completion my recommendations would be to install a completion plugin like:

Under the assomption that you have already configured the associated connections to a language server.

For coc You can do it for Python using the command :CocInstall coc-pyright

For nvim-cmp I would recommend to install:

That require:

You can then install the LSP server for Python with the Neovim command: :MasonInstall pyright

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.