-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot understand keybinding #811
Comments
And when I want to use
but it just pop I installed all the prerequisite packages and i don't know why it cannot work |
method textDocument/codeAction is not supported by any of the servers registered for the current buffer means your lsp doesn't support code action, so you can't use "<A-d>" is alt+d in my setup, you cannot trigger this? |
Is lsp a plugin instead of a built-in feature? i'm new to neovim and just install your config. Isn't it enough to just install the prerequisite you required in the wiki and run the shell script to use neovim? and yes, |
|
Yes. We have configured some common lsp servers to make it work out of box.
Different lsp servers have different levels of support. For example, bashls doesn't support lsp rename and find reference by scope. |
@LysanderT FYI: intro.txt#key-notation. An editor (strictly speaking, a service provider) semantically parses your code in order to understand them and could provide support for advanced features such as code actions. Most editors exchange "messages" with the server (or the executable installed on your host machine) through Language Server Protocol (LSP), and the capabilities that the server has are closely related to the implementation of its Abstract Syntax Tree (AST). Neovim implements the protocol internally (or builtin), but how it's utilized depends on how the user configures that (e.g., nvim-lspconfig provides quickstart configs for Nvim LSP). One significant difference from say, VSCode is that the vsix extension you install completes all those configuration behind the scene, but NeoVim does not - in other words, VSCode sacrifices extensibility in exchange for a completely out-of-box experience; NeoVim, on the other hand, focuses more on "grabbing what you need", which provides huge possibilities for custom configs. But it is worth noting that if a server doesn't have a certain capability (such as Goto Definition), then such feature is not supported on any editor that uses this implementation. |
so i need to replace my lsp server with another one right? |
if you can find a better replacement :) |
thanks for giving the explanation but i'm still confused. is it to say the shell script in the repo won't help configure lsp and i need to configure it by myself? |
oh i see. thank you for your kindness :) |
normally u should config your lsp in the nvim config, the shell script only downloads the essential package that make things work. |
Ys as @CharlesChiuGit said to use a server, you need the server itself (the executable) and the correct protocol setups so that your server can start to exchange information with Neovim. We setup those servers via nvim-lspconfig. Details on how to setup your servers: Wiki: Usage#modify-lsps-linters-and-formatters. |
thank you guys, what you said helped me a lot :) |
for example, I want to use this hotkey:
and i try
<space> + letter <A> + letter <d>
but when i press
<A>
, it always output "E21 不能修改:因为选项‘modifiable‘是关的"I also guess
A
representAlt
. Sinceoption
is the macOS version ofAlt
, so I try pressingoption
. But still not workThe text was updated successfully, but these errors were encountered: