LSP: Language Server Protocol

LSP is an open protocol supported by many code editors (including Nvpunk) to provide language specific features, including:

Nvpunk preinstalls some language servers, to install more language servers, or to update the ones you have already installed, you can use the Mason package manager with the following command:

:Mason

Or use the Mason Package Manager button in the greeter.

This will open up the Mason popup. From here you will be able to install, remove and update your language servers.

Type g? inside the Mason window to get an overview of its specific commands.

LSP Sepcific Key Maps

When a language server is available for your language, a set of LSP sepcific key maps will be enabled:

ShortcutAction
gDGo to declaration
gdGo to definition
grGo to references
gIGo to implementation
KInformation on the symbol under the cursor
<C-k>Signature help
<space>rnRefactor → rename
<space>eExpand diagnostics under the cursor
]dNext diagnostic
[dPrevious diagnostic
<space>caCode actions
<space>vdDisable virtual text
<space>veEnable virtual text
<space>fFormat code