My full config is on GitHub.
lsp-config.lua I have the following:
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
However, when I press
K on the name of a function, nothing happens. Also, when I run
:map! K I get:
No mapping found
What am I doing wrong?
I want to know what the function signature on
NewGoFunction is so that I can better understand what it expects.
I've just realised that some other key bindings aren't working either. For example I have:
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
But when I press that, I get:
E388: Could not find definition
So it is trying to go to definition for some reason!
I'm really confused.
I am using
gopls as the language server for LSP. Here is the output of
:LSPInfo.) In other words, give a full repro (reproducible walkthrough) of your situation.