mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
docs: clarify wording; add examples and remove redundancies
This commit is contained in:
parent
37750d9bef
commit
f1d72cf076
15 changed files with 262 additions and 90 deletions
|
@ -1,17 +1,22 @@
|
|||
# LSP Custom Packages/Command {#sec-languages-custom-lsp-packages}
|
||||
|
||||
In any of the `opt.languages.<language>.lsp.package` options you can provide
|
||||
your own LSP package, or provide the command to launch the language server, as a
|
||||
list of strings. You can use this to skip automatic installation of a language
|
||||
server, and instead use the one found in your `$PATH` during runtime, for
|
||||
example:
|
||||
One of the strengths of **nvf** is convenient aliases to quickly configure LSP
|
||||
servers through the Nix module system. By default the LSP packages for relevant
|
||||
language modules will be pulled into the closure. If this is not desirable, you
|
||||
may provide **a custom LSP package** (e.g., a Bash script that calls a command)
|
||||
or **a list of strings** to be interpreted as the command to launch the language
|
||||
server. By using a list of strings, you can use this to skip automatic
|
||||
installation of a language server, and instead use the one found in your `$PATH`
|
||||
during runtime, for example:
|
||||
|
||||
```nix
|
||||
vim.languages.java = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
# this expects jdt-language-server to be in your PATH
|
||||
# or in `vim.extraPackages`
|
||||
|
||||
# This expects 'jdt-language-server' to be in your PATH or in
|
||||
# 'vim.extraPackages.' There are no additional checks performed to see
|
||||
# if the command provided is valid.
|
||||
package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue