2023-02-01 20:11:37 +01:00
[[ch-languages]]
== Language Support
2023-04-18 00:10:49 +02:00
Language specific support means there is a combination of language specific plugins, `treesitter` support, `nvim-lspconfig` language servers, and `null-ls` integration. This gets you capabilities ranging from autocompletion to formatting to diagnostics. The following languages have sections under the `vim.languages` attribute. See the configuration docs for details.
2023-02-01 20:11:37 +01:00
2023-04-18 00:10:49 +02:00
* Rust: <<opt-vim.languages.rust.enable>>
* Nix: <<opt-vim.languages.nix.enable>>
* SQL: <<opt-vim.languages.sql.enable>>
* C/C++: <<opt-vim.languages.clang.enable>>
* Typescript/Javascript: <<opt-vim.languages.ts.enable>>
* Python: <<opt-vim.languages.python.enable>>:
* Zig: <<opt-vim.languages.zig.enable>>
* Markdown: <<opt-vim.languages.markdown.enable>>
* HTML: <<opt-vim.languages.html.enable>>
2023-04-19 12:31:14 +02:00
* SQL: <<opt-vim.languages.sql.enable>>
* Dart: <<opt-vim.languages.dart.enable>>
* Go: <<opt-vim.languages.go.enable>>
2023-10-03 21:06:26 +02:00
* Lua: <<opt-vim.languages.lua.enable>>
2023-10-08 14:34:55 +02:00
* PHP: <<opt-vim.languages.php.enable>>
2023-02-01 20:11:37 +01:00
2023-10-03 21:06:26 +02:00
Adding support for more languages, and improving support for existing ones are great places
where you can contribute with a PR.
2023-02-01 20:11:37 +01:00
2023-09-23 02:42:26 +02:00
=== LSP Custom Packages/Command
2023-10-03 21:06:26 +02:00
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.
2023-09-23 02:42:26 +02:00
2023-10-03 21:06:26 +02:00
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:
2023-09-23 02:42:26 +02:00
[source,nix]
----
vim.languages.java = {
2023-10-03 21:06:26 +02:00
lsp = {
enable = true;
package = ["jdt-language-server" "-data" "~/.cache/jdtls/workspace"];
};
2023-09-23 02:42:26 +02:00
}
----