aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md13
-rw-r--r--doc/configs.md703
-rw-r--r--doc/configs.txt608
-rw-r--r--doc/lspconfig.txt38
-rw-r--r--lsp/angularls.lua4
-rw-r--r--lsp/astro.lua36
-rw-r--r--lsp/basedpyright.lua5
-rw-r--r--lsp/biome.lua15
-rw-r--r--lsp/clangd.lua4
-rw-r--r--lsp/codebook.lua2
-rw-r--r--lsp/csharp_ls.lua6
-rw-r--r--lsp/denols.lua55
-rw-r--r--lsp/emmet_language_server.lua2
-rw-r--r--lsp/erlangls.lua21
-rw-r--r--lsp/eslint.lua48
-rw-r--r--lsp/flow.lua2
-rw-r--r--lsp/fortitude.lua30
-rw-r--r--lsp/fortls.lua2
-rw-r--r--lsp/fsautocomplete.lua2
-rw-r--r--lsp/gn_language_server.lua13
-rw-r--r--lsp/golangci_lint_ls.lua17
-rw-r--r--lsp/html.lua2
-rw-r--r--lsp/intelephense.lua7
-rw-r--r--lsp/julials.lua10
-rw-r--r--lsp/kakehashi.lua41
-rw-r--r--lsp/lua_ls.lua44
-rw-r--r--lsp/neocmake.lua2
-rw-r--r--lsp/oso.lua32
-rw-r--r--lsp/oxfmt.lua55
-rw-r--r--lsp/oxlint.lua72
-rw-r--r--lsp/pony_language_server.lua17
-rw-r--r--lsp/pony_lsp.lua24
-rw-r--r--lsp/pyrefly.lua4
-rw-r--r--lsp/rome.lua1
-rw-r--r--lsp/roslyn_ls.lua15
-rw-r--r--lsp/ruby_lsp.lua8
-rw-r--r--lsp/rust_analyzer.lua35
-rw-r--r--lsp/slangd.lua2
-rw-r--r--lsp/snyk_ls.lua84
-rw-r--r--lsp/systemd_ls.lua11
-rw-r--r--lsp/ts_ls.lua43
-rw-r--r--lsp/tsgo.lua49
-rw-r--r--lsp/vala_ls.lua2
-rw-r--r--lsp/volar.lua12
-rw-r--r--lsp/vscoqtop.lua11
-rw-r--r--lsp/vtsls.lua21
-rw-r--r--lua/lspconfig/configs/angularls.lua2
-rw-r--r--lua/lspconfig/configs/biome.lua1
-rw-r--r--lua/lspconfig/configs/denols.lua2
-rw-r--r--lua/lspconfig/configs/eslint.lua2
-rw-r--r--lua/lspconfig/configs/flow.lua2
-rw-r--r--lua/lspconfig/configs/golangci_lint_ls.lua17
-rw-r--r--lua/lspconfig/configs/oxlint.lua1
-rw-r--r--lua/lspconfig/configs/relay_lsp.lua2
-rw-r--r--lua/lspconfig/configs/rome.lua1
-rw-r--r--lua/lspconfig/configs/ts_ls.lua2
-rw-r--r--lua/lspconfig/configs/vtsls.lua2
-rw-r--r--scripts/docs_template.txt2
58 files changed, 1855 insertions, 411 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 2dca9d81..efafbeeb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -132,12 +132,17 @@ If a config needs to be renamed or deprecated, changes its contents like this:
```lua
---@brief
---
---- Renamed to [vsrocq](#vsrocq)
-
-vim.deprecate('vscoqtop', 'vsrocq', '2.0.0', 'nvim-lspconfig', false)
+--- Renamed to [systemd_lsp](#systemd_lsp)
---@type vim.lsp.Config
-return vim.lsp.config.vsrocq
+return vim.tbl_extend('force', vim.lsp.config.systemd_lsp, {
+ on_init = function(...)
+ vim.deprecate('systemd_ls', 'systemd_lsp', '3.0.0', 'nvim-lspconfig', false)
+ if vim.lsp.config.systemd_lsp.on_init then
+ vim.lsp.config.systemd_lsp.on_init(...)
+ end
+ end,
+})
```
## Commit style
diff --git a/doc/configs.md b/doc/configs.md
index b7ffa45b..19161013 100644
--- a/doc/configs.md
+++ b/doc/configs.md
@@ -100,7 +100,6 @@ Nvim by running `:help lspconfig-all`.
- [emmet_ls](#emmet_ls)
- [emmylua_ls](#emmylua_ls)
- [erg_language_server](#erg_language_server)
-- [erlangls](#erlangls)
- [esbonio](#esbonio)
- [eslint](#eslint)
- [expert](#expert)
@@ -111,6 +110,7 @@ Nvim by running `:help lspconfig-all`.
- [flow](#flow)
- [flux_lsp](#flux_lsp)
- [foam_ls](#foam_ls)
+- [fortitude](#fortitude)
- [fortls](#fortls)
- [fsautocomplete](#fsautocomplete)
- [fsharp_language_server](#fsharp_language_server)
@@ -129,6 +129,7 @@ Nvim by running `:help lspconfig-all`.
- [glint](#glint)
- [glsl_analyzer](#glsl_analyzer)
- [glslls](#glslls)
+- [gn_language_server](#gn_language_server)
- [gnls](#gnls)
- [golangci_lint_ls](#golangci_lint_ls)
- [gopls](#gopls)
@@ -164,6 +165,7 @@ Nvim by running `:help lspconfig-all`.
- [jsonnet_ls](#jsonnet_ls)
- [julials](#julials)
- [just](#just)
+- [kakehashi](#kakehashi)
- [kcl](#kcl)
- [koka](#koka)
- [kotlin_language_server](#kotlin_language_server)
@@ -219,6 +221,8 @@ Nvim by running `:help lspconfig-all`.
- [opencl_ls](#opencl_ls)
- [openscad_ls](#openscad_ls)
- [openscad_lsp](#openscad_lsp)
+- [oso](#oso)
+- [oxfmt](#oxfmt)
- [oxlint](#oxlint)
- [pact_ls](#pact_ls)
- [pasls](#pasls)
@@ -233,6 +237,8 @@ Nvim by running `:help lspconfig-all`.
- [pico8_ls](#pico8_ls)
- [please](#please)
- [pli](#pli)
+- [pony_language_server](#pony_language_server)
+- [pony_lsp](#pony_lsp)
- [poryscript_pls](#poryscript_pls)
- [postgres_lsp](#postgres_lsp)
- [powershell_es](#powershell_es)
@@ -614,7 +620,7 @@ Default config:
- `cmd`: [../lsp/angularls.lua:93](../lsp/angularls.lua#L93)
- `filetypes` :
```lua
- { "typescript", "html", "typescriptreact", "typescript.tsx", "htmlangular" }
+ { "typescript", "html", "typescriptreact", "htmlangular" }
```
- `root_markers` :
```lua
@@ -933,13 +939,49 @@ https://github.com/withastro/language-tools/tree/main/packages/language-server
npm install -g @astrojs/language-server
```
+If typescript is installed globally, you might get the `\`typescript.tsdk\` init option is required` error.
+You will need to manually pass the typescript SDK path. Here is an example of a Nix configuration where typescript is installed via Nix's Home-manager:
+
+```nix
+{ config, pkgs, ... }:
+
+{
+ home.packages = with pkgs; [
+ typescript
+ ];
+
+ programs.neovim = {
+ plugins = with pkgs.vimPlugins; [
+ nvim-lspconfig
+ ];
+ extraPackages = with pkgs; [
+ astro-language-server
+ ];
+ initLua = ''
+ vim.lsp.config['astro'] = {
+ init_options = {
+ typescript = {
+ tsdk = ${pkgs.typescript}/lib/node_modules/typescript/lib,
+ },
+ },
+ }
+
+ vim.lsp.enable('astro')
+
+ -- ...
+ '';
+ };
+}
+```
+The path can also be passed via a variable, like `vim.g.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"` and then used in the Lua Neovim config.
+
Snippet to enable the language server:
```lua
vim.lsp.enable('astro')
```
Default config:
-- `before_init`: [../lsp/astro.lua:13](../lsp/astro.lua#L13)
+- `before_init`: [../lsp/astro.lua:49](../lsp/astro.lua#L49)
- `cmd` :
```lua
{ "astro-ls", "--stdio" }
@@ -1371,8 +1413,7 @@ Default config:
basedpyright = {
analysis = {
autoSearchPaths = true,
- diagnosticMode = "openFilesOnly",
- useLibraryCodeForTypes = true
+ diagnosticMode = "openFilesOnly"
}
}
}
@@ -1605,7 +1646,7 @@ Default config:
- `cmd`: [../lsp/biome.lua:17](../lsp/biome.lua#L17)
- `filetypes` :
```lua
- { "astro", "css", "graphql", "html", "javascript", "javascriptreact", "json", "jsonc", "svelte", "typescript", "typescript.tsx", "typescriptreact", "vue" }
+ { "astro", "css", "graphql", "html", "javascript", "javascriptreact", "json", "jsonc", "svelte", "typescript", "typescriptreact", "vue" }
```
- `root_dir`: [../lsp/biome.lua:17](../lsp/biome.lua#L17)
- `workspace_required` : `true`
@@ -2166,6 +2207,7 @@ Default config:
```lua
{ "c", "cpp", "objc", "objcpp", "cuda" }
```
+- `get_language_id`: [../lsp/clangd.lua:65](../lsp/clangd.lua#L65)
- `on_attach`: [../lsp/clangd.lua:65](../lsp/clangd.lua#L65)
- `on_init`: [../lsp/clangd.lua:65](../lsp/clangd.lua#L65)
- `root_markers` :
@@ -2309,7 +2351,7 @@ Default config:
```
- `filetypes` :
```lua
- { "c", "css", "gitcommit", "go", "haskell", "html", "java", "javascript", "javascriptreact", "lua", "markdown", "php", "python", "ruby", "rust", "toml", "text", "typescript", "typescriptreact" }
+ { "c", "css", "gitcommit", "go", "haskell", "html", "java", "javascript", "javascriptreact", "lua", "markdown", "php", "python", "ruby", "rust", "swift", "toml", "text", "typescript", "typescriptreact", "zig" }
```
- `root_markers` :
```lua
@@ -2436,11 +2478,11 @@ Default config:
{
editorInfo = {
name = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
editorPluginInfo = {
name = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
}
}
```
@@ -2533,6 +2575,7 @@ Default config:
```lua
{ "cs" }
```
+- `get_language_id`: [../lsp/csharp_ls.lua:14](../lsp/csharp_ls.lua#L14)
- `init_options` :
```lua
{
@@ -3047,6 +3090,37 @@ vim.g.markdown_fenced_languages = {
}
```
+Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+expects to run in Node or Web Browsers. This supports having a Deno module that is a part of a mostly-not-Deno
+monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json or deno.jsonc.
+Note that this means that without a deno.json, deno.jsonc, or deno.lock file, this LSP client will not attach.
+
+Example:
+
+```
+project-root
++-- node_modules/...
++-- package-lock.json
++-- package.json
++-- packages
+ +-- deno-module
+ | +-- deno.json
+ | +-- package.json <-- It's normal for Deno projects to have package.json files!
+ | +-- src
+ | +-- index.ts <-- this is a Deno file
+ +-- node-module
+ +-- package.json
+ +-- src
+ +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgo)
+```
+
+From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we attach.
+If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we attach.
+Otherwise, we abort, because this is a non-Deno TS file.
+
Snippet to enable the language server:
```lua
vim.lsp.enable('denols')
@@ -3065,7 +3139,7 @@ Default config:
```
- `filetypes` :
```lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
```
- `handlers` :
```lua
@@ -3075,8 +3149,8 @@ Default config:
["textDocument/typeDefinition"] = <function 1>
}
```
-- `on_attach`: [../lsp/denols.lua:67](../lsp/denols.lua#L67)
-- `root_dir`: [../lsp/denols.lua:67](../lsp/denols.lua#L67)
+- `on_attach`: [../lsp/denols.lua:98](../lsp/denols.lua#L98)
+- `root_dir`: [../lsp/denols.lua:98](../lsp/denols.lua#L98)
- `settings` :
```lua
{
@@ -3805,7 +3879,7 @@ Default config:
```
- `filetypes` :
```lua
- { "astro", "css", "eruby", "html", "htmlangular", "htmldjango", "javascriptreact", "less", "pug", "sass", "scss", "svelte", "templ", "typescriptreact", "vue" }
+ { "astro", "css", "eruby", "html", "htmlangular", "htmldjango", "javascriptreact", "less", "sass", "scss", "svelte", "typescriptreact", "vue" }
```
- `root_markers` :
```lua
@@ -3912,42 +3986,6 @@ Default config:
---
-## erlangls
-
-https://erlang-ls.github.io
-
-Language Server for Erlang.
-
-Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls)
-Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin`
-
-Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls).
-
-Installation requirements:
- - [Erlang OTP 21+](https://github.com/erlang/otp)
- - [rebar3 3.9.1+](https://github.com/erlang/rebar3)
-
-Snippet to enable the language server:
-```lua
-vim.lsp.enable('erlangls')
-```
-
-Default config:
-- `cmd` :
- ```lua
- { "erlang_ls" }
- ```
-- `filetypes` :
- ```lua
- { "erlang" }
- ```
-- `root_markers` :
- ```lua
- { "rebar.config", "erlang.mk", ".git" }
- ```
-
----
-
## esbonio
https://github.com/swyddfa/esbonio
@@ -4055,20 +4093,38 @@ You can use a different version of ESLint in each package, but it is recommended
/!\ When using flat config files, you need to use them across all your packages in your monorepo, as it's a global setting for the server.
+### Flat config in ESLint versions prior to 10.0
+
+If you're using a ESLint version that supports both flat config and eslintrc (>= 8.21, < 10.0) and want to change
+the [default behavior](https://eslint.org/blog/2023/10/flat-config-rollout-plans/), you'll need to set
+`experimental.useFlatConfig` accordingly:
+```lua
+vim.lsp.config("eslint", {
+ settings = {
+ experimental = {
+ -- If you want to use flat config on >= 8.21, < 9.0
+ useFlatConfig = true,
+ -- Or if you want to use eslintrc on 9.*
+ -- useFlatConfig = false,
+ }
+ }
+})
+```
+
Snippet to enable the language server:
```lua
vim.lsp.enable('eslint')
```
Default config:
-- `before_init`: [../lsp/eslint.lua:61](../lsp/eslint.lua#L61)
+- `before_init`: [../lsp/eslint.lua:79](../lsp/eslint.lua#L79)
- `cmd` :
```lua
{ "vscode-eslint-language-server", "--stdio" }
```
- `filetypes` :
```lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro", "htmlangular" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro", "htmlangular" }
```
- `handlers` :
```lua
@@ -4079,8 +4135,8 @@ Default config:
["eslint/probeFailed"] = <function 4>
}
```
-- `on_attach`: [../lsp/eslint.lua:61](../lsp/eslint.lua#L61)
-- `root_dir`: [../lsp/eslint.lua:61](../lsp/eslint.lua#L61)
+- `on_attach`: [../lsp/eslint.lua:79](../lsp/eslint.lua#L79)
+- `root_dir`: [../lsp/eslint.lua:79](../lsp/eslint.lua#L79)
- `settings` :
```lua
{
@@ -4097,9 +4153,7 @@ Default config:
enable = false,
mode = "all"
},
- experimental = {
- useFlatConfig = false
- },
+ experimental = {},
format = true,
nodePath = "",
onIgnoredFiles = "off",
@@ -4299,7 +4353,7 @@ Default config:
- `cmd`: [../lsp/flow.lua:16](../lsp/flow.lua#L16)
- `filetypes` :
```lua
- { "javascript", "javascriptreact", "javascript.jsx" }
+ { "javascript", "javascriptreact" }
```
- `root_markers` :
```lua
@@ -4364,6 +4418,49 @@ Default config:
---
+## fortitude
+
+https://fortitude.readthedocs.io/en/stable/
+
+Fortitude is a Fortran linter built in Rust and inspired by (and build upon) Ruff
+
+```sh
+# Install With uv:
+uv tool install fortitude-lint@latest
+
+# Install with pip:
+pip install fortitude-lint
+```
+
+**LSP is available in Fortitude `v0.8.0`.**
+
+Refer to the [documentation](https://fortitude.readthedocs.io/en/stable/editors/) for more details.
+
+Snippet to enable the language server:
+```lua
+vim.lsp.enable('fortitude')
+```
+
+Default config:
+- `cmd` :
+ ```lua
+ { "fortitude", "server" }
+ ```
+- `filetypes` :
+ ```lua
+ { "fortran" }
+ ```
+- `root_markers` :
+ ```lua
+ { "fpm.toml", "fortitude.toml", ".fortitude.toml", ".git" }
+ ```
+- `settings` :
+ ```lua
+ {}
+ ```
+
+---
+
## fortls
https://fortls.fortran-lang.org/index.html
@@ -4394,7 +4491,7 @@ Default config:
```
- `root_markers` :
```lua
- { ".fortls", ".git" }
+ { ".fortls", ".fortlsrc", ".fortls.json", ".git" }
```
- `settings` :
```lua
@@ -4873,20 +4970,20 @@ Default config:
{
editorInfo = {
name = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
editorPluginInfo = {
name = "Neovim LSP",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
extension = {
name = "Neovim LSP Client",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
ide = {
name = "Neovim",
vendor = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
}
}
```
@@ -5115,6 +5212,34 @@ Default config:
---
+## gn_language_server
+
+https://github.com/google/gn-language-server
+
+A language server for GN, the build configuration language used in Chromium,
+Fuchsia, and other projects.
+
+Snippet to enable the language server:
+```lua
+vim.lsp.enable('gn_language_server')
+```
+
+Default config:
+- `cmd` :
+ ```lua
+ { "gn-language-server", "--stdio" }
+ ```
+- `filetypes` :
+ ```lua
+ { "gn" }
+ ```
+- `root_markers` :
+ ```lua
+ { ".gn", ".git" }
+ ```
+
+---
+
## gnls
https://github.com/microsoft/gnls
@@ -5184,7 +5309,7 @@ Default config:
- `init_options` :
```lua
{
- command = { "golangci-lint", "run", "--output.json.path=stdout", "--show-stats=false" }
+ command = { "golangci-lint", "run", "--output.text.path=", "--output.tab.path=", "--output.html.path=", "--output.checkstyle.path=", "--output.junit-xml.path=", "--output.teamcity.path=", "--output.sarif.path=", "--show-stats=false", "--output.json.path=stdout" }
}
```
- `root_markers` :
@@ -5794,7 +5919,7 @@ Default config:
```
- `filetypes` :
```lua
- { "html", "templ" }
+ { "html" }
```
- `init_options` :
```lua
@@ -6032,6 +6157,16 @@ Default config:
```lua
{ ".git", "composer.json" }
```
+- `settings` :
+ ```lua
+ {
+ intelephense = {
+ telemetry = {
+ enabled = false
+ }
+ }
+ }
+ ```
---
@@ -6362,6 +6497,11 @@ Julia project, you must make sure that the project is instantiated:
julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()'
```
+To activate a Julia environment, use the `:LspJuliaActivateEnv` command. A prompt will ask you to select a Julia
+environment from the list of environments found in the current working directory and the `environments/` folder of
+`$JULIA_DEPOT_PATH` entries. You can also provide a path to a Julia environment directly.
+Example: `:LspJuliaActivateEnv /path/to/my/project`.
+
Note: The julia programming language searches for global environments within the `environments/`
folder of `$JULIA_DEPOT_PATH` entries. By default this simply `~/.julia/environments`
@@ -6379,7 +6519,7 @@ Default config:
```lua
{ "julia" }
```
-- `on_attach`: [../lsp/julials.lua:121](../lsp/julials.lua#L121)
+- `on_attach`: [../lsp/julials.lua:127](../lsp/julials.lua#L127)
- `root_markers` :
```lua
{ "Project.toml", "JuliaProject.toml" }
@@ -6414,6 +6554,59 @@ Default config:
---
+## kakehashi
+
+https://github.com/atusy/kakehashi
+
+Tree-sitter-based language server that provides semantic tokens, selection ranges,
+and LSP bridging for embedded languages (e.g., code blocks in Markdown).
+
+kakehashi works with any language that has a Tree-sitter grammar.
+Parsers and queries are automatically installed on first use
+when `autoInstall` is enabled (the default). This requires the
+`tree-sitter` CLI, a C compiler, and Git.
+
+**You must specify `filetypes` in your call to `vim.lsp.config`** to
+restrict which files activate the server:
+
+```lua
+vim.lsp.config('kakehashi', {
+ filetypes = { 'markdown', 'lua', 'rust', 'python' },
+ init_options = {
+ autoInstall = true,
+ -- Optional: bridge LSP requests in injection regions
+ languageServers = {
+ ['lua_ls'] = {
+ cmd = { 'lua-language-server' },
+ languages = { 'lua' },
+ },
+ },
+ languages = {
+ markdown = {
+ bridge = { lua_ls = { enabled = true } },
+ },
+ },
+ },
+})
+```
+
+Snippet to enable the language server:
+```lua
+vim.lsp.enable('kakehashi')
+```
+
+Default config:
+- `cmd` :
+ ```lua
+ { "kakehashi" }
+ ```
+- `root_markers` :
+ ```lua
+ { "kakehashi.toml", ".git" }
+ ```
+
+---
+
## kcl
https://github.com/kcl-lang/kcl.nvim
@@ -6911,25 +7104,23 @@ vim.lsp.config('lua_ls', {
workspace = {
checkThirdParty = false,
library = {
- vim.env.VIMRUNTIME
+ vim.env.VIMRUNTIME,
-- Depending on the usage, you might want to add additional paths
-- here.
- -- '${3rd}/luv/library'
- -- '${3rd}/busted/library'
- }
+ -- '${3rd}/luv/library',
+ -- '${3rd}/busted/library',
+ },
-- Or pull in all of 'runtimepath'.
-- NOTE: this is a lot slower and will cause issues when working on
-- your own configuration.
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
- -- library = {
- -- vim.api.nvim_get_runtime_file('', true),
- -- }
- }
+ -- library = vim.api.nvim_get_runtime_file('', true),
+ },
})
end,
settings = {
- Lua = {}
- }
+ Lua = {},
+ },
})
```
@@ -6953,7 +7144,7 @@ Default config:
```
- `root_markers` :
```lua
- { ".emmyrc.json", ".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml", ".git" }
+ { { ".emmyrc.json", ".luarc.json", ".luarc.jsonc" }, { ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml" }, { ".git" } }
```
- `settings` :
```lua
@@ -7788,7 +7979,7 @@ Default config:
```
- `root_markers` :
```lua
- { ".git", "build", "cmake" }
+ { ".neocmake.toml", ".git", "build", "cmake" }
```
---
@@ -8416,32 +8607,121 @@ Default config:
---
+## oso
+
+https://www.osohq.com/docs/develop/local-dev/env-setup
+
+Oso Polar language server.
+
+`oso-cloud` can be installed by following the instructions
+[here](https://www.osohq.com/docs/develop/local-dev/env-setup).
+
+The default `cmd` assumes that the `oso-cloud` binary can be found in the `$PATH`.
+
+You may need to configure the filetype for Polar (*.polar) files:
+
+```
+autocmd BufNewFile,BufRead *.polar set filetype=polar
+```
+
+or
+
+```lua
+vim.filetype.add({
+ pattern = {
+ ['.*/*.polar'] = 'polar',
+ },
+})
+
+Alternatively, you may use a syntax plugin like https://github.com/osohq/polar.vim
+
+Snippet to enable the language server:
+```lua
+vim.lsp.enable('oso')
+```
+
+Default config:
+- `cmd` :
+ ```lua
+ { "oso-cloud", "lsp" }
+ ```
+- `filetypes` :
+ ```lua
+ { "polar" }
+ ```
+
+---
+
+## oxfmt
+
+https://github.com/oxc-project/oxc
+https://oxc.rs/docs/guide/usage/formatter.html
+
+`oxfmt` is a Prettier-compatible code formatter that supports multiple languages
+including JavaScript, TypeScript, JSON, YAML, HTML, CSS, Markdown, and more.
+It can be installed via `npm`:
+
+```sh
+npm i -g oxfmt
+```
+
+Snippet to enable the language server:
+```lua
+vim.lsp.enable('oxfmt')
+```
+
+Default config:
+- `cmd`: [../lsp/oxfmt.lua:17](../lsp/oxfmt.lua#L17)
+- `filetypes` :
+ ```lua
+ { "javascript", "javascriptreact", "typescript", "typescriptreact", "toml", "json", "jsonc", "json5", "yaml", "html", "vue", "handlebars", "css", "scss", "less", "graphql", "markdown" }
+ ```
+- `root_dir`: [../lsp/oxfmt.lua:17](../lsp/oxfmt.lua#L17)
+- `workspace_required` : `true`
+
+---
+
## oxlint
https://github.com/oxc-project/oxc
+https://oxc.rs/docs/guide/usage/linter.html
-`oxc` is a linter / formatter for JavaScript / Typescript supporting over 500 rules from ESLint and its popular plugins
+`oxlint` is a linter for JavaScript / TypeScript supporting over 500 rules from ESLint and its popular plugins.
+It also supports linting framework files (Vue, Svelte, Astro) by analyzing their <script> blocks.
It can be installed via `npm`:
```sh
npm i -g oxlint
```
+Type-aware linting will automatically be enabled if `tsgolint` exists in your
+path and your `.oxlintrc.json` contains the string "typescript".
+
+The default `on_attach` function provides an `:LspOxlintFixAll` command which
+can be used to fix all fixable diagnostics. See the `eslint` config entry for
+an example of how to use this to automatically fix all errors on write.
+
Snippet to enable the language server:
```lua
vim.lsp.enable('oxlint')
```
Default config:
-- `cmd` :
+- `before_init`: [../lsp/oxlint.lua:32](../lsp/oxlint.lua#L32)
+- `cmd`: [../lsp/oxlint.lua:32](../lsp/oxlint.lua#L32)
+- `filetypes` :
```lua
- { "oxc_language_server" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro" }
```
-- `filetypes` :
+- `on_attach`: [../lsp/oxlint.lua:32](../lsp/oxlint.lua#L32)
+- `root_markers` :
```lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { ".oxlintrc.json", "oxlint.config.ts" }
+ ```
+- `settings` :
+ ```lua
+ {}
```
-- `root_dir`: [../lsp/oxlint.lua:15](../lsp/oxlint.lua#L15)
- `workspace_required` : `true`
---
@@ -8875,6 +9155,81 @@ Default config:
---
+## pony_language_server
+
+Renamed to [pony_lsp](#pony_lsp)
+
+Snippet to enable the language server:
+```lua
+vim.lsp.enable('pony_language_server')
+```
+
+Default config:
+- `cmd` :
+ ```lua
+ { "pony-lsp" }
+ ```
+- `filetypes` :
+ ```lua
+ { "pony" }
+ ```
+- `name` :
+ ```lua
+ "pony_lsp"
+ ```
+- `on_init`: [../lsp/pony_language_server.lua:6](../lsp/pony_language_server.lua#L6)
+- `root_markers` :
+ ```lua
+ { "corral.json", ".git" }
+ ```
+- `settings` :
+ ```lua
+ {
+ ["pony-lsp"] = {
+ defines = {},
+ ponypath = {}
+ }
+ }
+ ```
+
+---
+
+## pony_lsp
+
+https://github.com/ponylang/ponyc/tree/main/tools/pony-lsp
+
+Language server for the Pony programming language
+
+Snippet to enable the language server:
+```lua
+vim.lsp.enable('pony_lsp')
+```
+
+Default config:
+- `cmd` :
+ ```lua
+ { "pony-lsp" }
+ ```
+- `filetypes` :
+ ```lua
+ { "pony" }
+ ```
+- `root_markers` :
+ ```lua
+ { "corral.json", ".git" }
+ ```
+- `settings` :
+ ```lua
+ {
+ ["pony-lsp"] = {
+ defines = {},
+ ponypath = {}
+ }
+ }
+ ```
+
+---
+
## poryscript_pls
https://github.com/huderlem/poryscript-pls
@@ -10015,7 +10370,7 @@ Default config:
```
- `filetypes` :
```lua
- { "javascript", "javascriptreact", "json", "typescript", "typescript.tsx", "typescriptreact" }
+ { "javascript", "javascriptreact", "json", "typescript", "typescriptreact" }
```
- `root_markers` :
```lua
@@ -10068,7 +10423,7 @@ Default config:
```
- `cmd` :
```lua
- { "Microsoft.CodeAnalysis.LanguageServer", "--logLevel", "Information", "--extensionLogDirectory", "/tmp/roslyn_ls/logs", "--stdio" }
+ { "roslyn-language-server", "--logLevel", "Information", "--extensionLogDirectory", "/tmp/roslyn_ls/logs", "--stdio" }
```
- `commands` :
```lua
@@ -10096,12 +10451,12 @@ Default config:
```lua
"utf-8"
```
-- `on_attach`: [../lsp/roslyn_ls.lua:102](../lsp/roslyn_ls.lua#L102)
+- `on_attach`: [../lsp/roslyn_ls.lua:112](../lsp/roslyn_ls.lua#L112)
- `on_init` :
```lua
{ <function 1> }
```
-- `root_dir`: [../lsp/roslyn_ls.lua:102](../lsp/roslyn_ls.lua#L102)
+- `root_dir`: [../lsp/roslyn_ls.lua:112](../lsp/roslyn_ls.lua#L112)
- `settings` :
```lua
{
@@ -10221,10 +10576,7 @@ vim.lsp.enable('ruby_lsp')
```
Default config:
-- `cmd` :
- ```lua
- { "ruby-lsp" }
- ```
+- `cmd`: [../lsp/ruby_lsp.lua:16](../lsp/ruby_lsp.lua#L16)
- `filetypes` :
```lua
{ "ruby", "eruby" }
@@ -10428,7 +10780,7 @@ vim.lsp.enable('rust_analyzer')
```
Default config:
-- `before_init`: [../lsp/rust_analyzer.lua:56](../lsp/rust_analyzer.lua#L56)
+- `before_init`: [../lsp/rust_analyzer.lua:85](../lsp/rust_analyzer.lua#L85)
- `capabilities` :
```lua
{
@@ -10448,8 +10800,8 @@ Default config:
```lua
{ "rust" }
```
-- `on_attach`: [../lsp/rust_analyzer.lua:56](../lsp/rust_analyzer.lua#L56)
-- `root_dir`: [../lsp/rust_analyzer.lua:56](../lsp/rust_analyzer.lua#L56)
+- `on_attach`: [../lsp/rust_analyzer.lua:85](../lsp/rust_analyzer.lua#L85)
+- `root_dir`: [../lsp/rust_analyzer.lua:85](../lsp/rust_analyzer.lua#L85)
- `settings` :
```lua
{
@@ -10742,7 +11094,7 @@ Default config:
```
- `root_markers` :
```lua
- { ".git" }
+ { "slangdconfig.json", ".clang-format", ".git" }
```
---
@@ -10923,7 +11275,53 @@ Default config:
https://github.com/snyk/snyk-ls
-LSP for Snyk Open Source, Snyk Infrastructure as Code, and Snyk Code.
+**[Snyk](https://snyk.io)** is a developer security platform that helps you find and fix
+vulnerabilities in your code, open source dependencies, containers, and infrastructure as code.
+
+The Snyk Language Server provides real-time security scanning for:
+- **Snyk Open Source**: Find and fix vulnerabilities in open source dependencies
+- **Snyk Code**: Find and fix security vulnerabilities in your code
+- **Snyk Infrastructure as Code**: Find and fix security issues in Kubernetes, Terraform, and other IaC files
+
+## Authentication
+
+**Note**: Currently, only token-based authentication is supported in Neovim.
+
+1. Get your API token from https://app.snyk.io/account
+2. Set the `SNYK_TOKEN` environment variable:
+ ```sh
+ export SNYK_TOKEN="your-token-here"
+ ```
+
+## Trusted Folders
+
+Snyk requires you to trust directories before scanning them. To avoid being prompted every time:
+
+```lua
+vim.lsp.config('snyk_ls', {
+ init_options = {
+ trustedFolders = {
+ '/Users/yourname/projects', -- Trust your projects directory
+ '/path/to/another/trusted/dir',
+ },
+ },
+})
+```
+
+**Important**: Trust the top-level directory where you store your repositories, not individual repos.
+For example, if you work on `/Users/yourname/projects/my-app`, trust `/Users/yourname/projects`.
+Only trust directories containing code you trust to scan.
+
+## Configuration
+
+Full configuration options available at https://github.com/snyk/snyk-ls#configuration-1
+
+### Advanced Configuration
+
+For **non-default multi-tenant or single-tenant setups**, you may need to specify:
+
+- `endpoint`: Custom Snyk API endpoint (e.g., `https://api.eu.snyk.io` for EU, or your single-tenant URL)
+```
Snippet to enable the language server:
```lua
@@ -10933,16 +11331,22 @@ vim.lsp.enable('snyk_ls')
Default config:
- `cmd` :
```lua
- { "snyk-ls" }
+ { "snyk", "language-server", "-l", "info" }
```
- `filetypes` :
```lua
- { "go", "gomod", "javascript", "typescript", "json", "python", "requirements", "helm", "yaml", "terraform", "terraform-vars" }
+ { "apex", "apexcode", "c", "cpp", "cs", "dart", "dockerfile", "elixir", "eelixir", "go", "gomod", "groovy", "helm", "java", "javascript", "json", "kotlin", "objc", "objcpp", "php", "python", "requirements", "ruby", "rust", "scala", "swift", "terraform", "terraform-vars", "typescript", "yaml" }
```
- `init_options` :
```lua
{
- activateSnykCode = "true"
+ activateSnykCode = "false",
+ activateSnykIac = "true",
+ activateSnykOpenSource = "true",
+ integrationName = "Neovim",
+ integrationVersion = "0.12.0-dev+g61f166ec40",
+ token = vim.NIL,
+ trustedFolders = {}
}
```
- `root_markers` :
@@ -11979,7 +12383,7 @@ Default config:
## systemd_ls
-stack overflow
+Renamed to [systemd_lsp](#systemd_lsp)
Snippet to enable the language server:
```lua
@@ -11987,7 +12391,19 @@ vim.lsp.enable('systemd_ls')
```
Default config:
-
+- `cmd` :
+ ```lua
+ { "systemd-lsp" }
+ ```
+- `filetypes` :
+ ```lua
+ { "systemd" }
+ ```
+- `name` :
+ ```lua
+ "systemd_lsp"
+ ```
+- `on_init`: [../lsp/systemd_ls.lua:6](../lsp/systemd_ls.lua#L6)
---
@@ -12785,6 +13201,37 @@ This works without the need of spawning multiple instances of `ts_ls`, saving me
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
+Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
+mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
+or deno.jsonc.
+
+Example:
+
+```
+project-root
++-- node_modules/...
++-- package-lock.json
++-- package.json
++-- packages
+ +-- deno-module
+ | +-- deno.json
+ | +-- package.json <-- It's normal for Deno projects to have package.json files!
+ | +-- src
+ | +-- index.ts <-- this is a Deno file
+ +-- node-module
+ +-- package.json
+ +-- src
+ +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
+```
+
+From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
+If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
+Otherwise, attach at PROJECT ROOT, or the cwd if not found.
+
Snippet to enable the language server:
```lua
vim.lsp.enable('ts_ls')
@@ -12806,7 +13253,7 @@ Default config:
```
- `filetypes` :
```lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
```
- `handlers` :
```lua
@@ -12820,8 +13267,8 @@ Default config:
hostInfo = "neovim"
}
```
-- `on_attach`: [../lsp/ts_ls.lua:47](../lsp/ts_ls.lua#L47)
-- `root_dir`: [../lsp/ts_ls.lua:47](../lsp/ts_ls.lua#L47)
+- `on_attach`: [../lsp/ts_ls.lua:77](../lsp/ts_ls.lua#L77)
+- `root_dir`: [../lsp/ts_ls.lua:77](../lsp/ts_ls.lua#L77)
---
@@ -12893,18 +13340,49 @@ This works without the need of spawning multiple instances of `tsgo`, saving mem
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
+Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
+mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
+or deno.jsonc.
+
+Example:
+
+```
+project-root
++-- node_modules/...
++-- package-lock.json
++-- package.json
++-- packages
+ +-- deno-module
+ | +-- deno.json
+ | +-- package.json <-- It's normal for Deno projects to have package.json files!
+ | +-- src
+ | +-- index.ts <-- this is a Deno file
+ +-- node-module
+ +-- package.json
+ +-- src
+ +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
+```
+
+From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
+If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
+Otherwise, attach at PROJECT ROOT, or the cwd if not found.
+
Snippet to enable the language server:
```lua
vim.lsp.enable('tsgo')
```
Default config:
-- `cmd`: [../lsp/tsgo.lua:18](../lsp/tsgo.lua#L18)
+- `cmd`: [../lsp/tsgo.lua:48](../lsp/tsgo.lua#L48)
- `filetypes` :
```lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
```
-- `root_dir`: [../lsp/tsgo.lua:18](../lsp/tsgo.lua#L18)
+- `root_dir`: [../lsp/tsgo.lua:48](../lsp/tsgo.lua#L48)
---
@@ -13442,7 +13920,7 @@ Default config:
## vala_ls
-https://github.com/Prince781/vala-language-server
+https://github.com/vala-lang/vala-language-server
Snippet to enable the language server:
```lua
@@ -13866,7 +14344,7 @@ Default config:
```lua
"vue_ls"
```
-- `on_init`: [../lsp/volar.lua:9](../lsp/volar.lua#L9)
+- `on_init`: [../lsp/volar.lua:6](../lsp/volar.lua#L6)
- `root_markers` :
```lua
{ "package.json" }
@@ -13896,6 +14374,7 @@ Default config:
```lua
"vsrocq"
```
+- `on_init`: [../lsp/vscoqtop.lua:6](../lsp/vscoqtop.lua#L6)
- `root_markers` :
```lua
{ "_RocqProject", "_CoqProject", ".git" }
@@ -13995,6 +14474,8 @@ This works without the need of spawning multiple instances of `vtsls`, saving me
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
+This includes the same Deno-excluding logic from `ts_ls`. It is not recommended to enable both `vtsls` and `ts_ls` at the same time!
+
Snippet to enable the language server:
```lua
vim.lsp.enable('vtsls')
@@ -14007,7 +14488,7 @@ Default config:
```
- `filetypes` :
```lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
```
- `init_options` :
```lua
@@ -14015,7 +14496,7 @@ Default config:
hostInfo = "neovim"
}
```
-- `root_dir`: [../lsp/vtsls.lua:69](../lsp/vtsls.lua#L69)
+- `root_dir`: [../lsp/vtsls.lua:71](../lsp/vtsls.lua#L71)
---
diff --git a/doc/configs.txt b/doc/configs.txt
index c02c1aad..5326b856 100644
--- a/doc/configs.txt
+++ b/doc/configs.txt
@@ -1,4 +1,4 @@
-*lspconfig-all*
+*lspconfig-all* All configurations provided by |lspconfig|
LSP configurations provided by nvim-lspconfig are listed below.
@@ -187,7 +187,7 @@ Snippet to enable the language server: >lua
Default config:
- cmd (use "gF" to view): ../lsp/angularls.lua:93
- filetypes: >lua
- { "typescript", "html", "typescriptreact", "typescript.tsx", "htmlangular" }
+ { "typescript", "html", "typescriptreact", "htmlangular" }
- root_markers: >lua
{ "angular.json", "nx.json" }
<
@@ -439,12 +439,46 @@ https://github.com/withastro/language-tools/tree/main/packages/language-server
`astro-ls` can be installed via `npm` >sh
npm install -g @astrojs/language-server
+If typescript is installed globally, you might get the `\`typescript.tsdk\` init option is required` error.
+You will need to manually pass the typescript SDK path. Here is an example of a Nix configuration where typescript is installed via Nix's Home-manager:
+>nix
+ { config, pkgs, ... }:
+
+ {
+ home.packages = with pkgs; [
+ typescript
+ ];
+
+ programs.neovim = {
+ plugins = with pkgs.vimPlugins; [
+ nvim-lspconfig
+ ];
+ extraPackages = with pkgs; [
+ astro-language-server
+ ];
+ initLua = ''
+ vim.lsp.config['astro'] = {
+ init_options = {
+ typescript = {
+ tsdk = ${pkgs.typescript}/lib/node_modules/typescript/lib,
+ },
+ },
+ }
+
+ vim.lsp.enable('astro')
+
+ -- ...
+ '';
+ };
+ }
+The path can also be passed via a variable, like `vim.g.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"` and then used in the Lua Neovim config.
+
Snippet to enable the language server: >lua
vim.lsp.enable('astro')
Default config:
-- before_init (use "gF" to view): ../lsp/astro.lua:13
+- before_init (use "gF" to view): ../lsp/astro.lua:49
- cmd: >lua
{ "astro-ls", "--stdio" }
- filetypes: >lua
@@ -782,8 +816,7 @@ Default config:
basedpyright = {
analysis = {
autoSearchPaths = true,
- diagnosticMode = "openFilesOnly",
- useLibraryCodeForTypes = true
+ diagnosticMode = "openFilesOnly"
}
}
}
@@ -962,7 +995,7 @@ Snippet to enable the language server: >lua
Default config:
- cmd (use "gF" to view): ../lsp/biome.lua:17
- filetypes: >lua
- { "astro", "css", "graphql", "html", "javascript", "javascriptreact", "json", "jsonc", "svelte", "typescript", "typescript.tsx", "typescriptreact", "vue" }
+ { "astro", "css", "graphql", "html", "javascript", "javascriptreact", "json", "jsonc", "svelte", "typescript", "typescriptreact", "vue" }
- root_dir (use "gF" to view): ../lsp/biome.lua:17
- `workspace_required` : `true`
<
@@ -1381,6 +1414,7 @@ Default config:
{ "clangd" }
- filetypes: >lua
{ "c", "cpp", "objc", "objcpp", "cuda" }
+- get_language_id (use "gF" to view): ../lsp/clangd.lua:65
- on_attach (use "gF" to view): ../lsp/clangd.lua:65
- on_init (use "gF" to view): ../lsp/clangd.lua:65
- root_markers: >lua
@@ -1488,7 +1522,7 @@ Default config:
- cmd: >lua
{ "codebook-lsp", "serve" }
- filetypes: >lua
- { "c", "css", "gitcommit", "go", "haskell", "html", "java", "javascript", "javascriptreact", "lua", "markdown", "php", "python", "ruby", "rust", "toml", "text", "typescript", "typescriptreact" }
+ { "c", "css", "gitcommit", "go", "haskell", "html", "java", "javascript", "javascriptreact", "lua", "markdown", "php", "python", "ruby", "rust", "swift", "toml", "text", "typescript", "typescriptreact", "zig" }
- root_markers: >lua
{ ".git", "codebook.toml", ".codebook.toml" }
<
@@ -1592,11 +1626,11 @@ Default config:
{
editorInfo = {
name = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
editorPluginInfo = {
name = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
}
}
- on_attach (use "gF" to view): ../lsp/copilot.lua:106
@@ -1667,6 +1701,7 @@ Default config:
- cmd (use "gF" to view): ../lsp/csharp_ls.lua:14
- filetypes: >lua
{ "cs" }
+- get_language_id (use "gF" to view): ../lsp/csharp_ls.lua:14
- init_options: >lua
{
AutomaticWorkspaceInit = true
@@ -2055,6 +2090,35 @@ To appropriately highlight codefences returned from denols, you will need to aug
"ts=typescript"
}
+Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+expects to run in Node or Web Browsers. This supports having a Deno module that is a part of a mostly-not-Deno
+monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json or deno.jsonc.
+Note that this means that without a deno.json, deno.jsonc, or deno.lock file, this LSP client will not attach.
+
+Example:
+>
+ project-root
+ +-- node_modules/...
+ +-- package-lock.json
+ +-- package.json
+ +-- packages
+ +-- deno-module
+ | +-- deno.json
+ | +-- package.json <-- It's normal for Deno projects to have package.json files!
+ | +-- src
+ | +-- index.ts <-- this is a Deno file
+ +-- node-module
+ +-- package.json
+ +-- src
+ +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgo)
+
+From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we attach.
+If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we attach.
+Otherwise, we abort, because this is a non-Deno TS file.
+
Snippet to enable the language server: >lua
vim.lsp.enable('denols')
@@ -2067,15 +2131,15 @@ Default config:
NO_COLOR = true
}
- filetypes: >lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
- handlers: >lua
{
["textDocument/definition"] = <function 1>,
["textDocument/references"] = <function 1>,
["textDocument/typeDefinition"] = <function 1>
}
-- on_attach (use "gF" to view): ../lsp/denols.lua:67
-- root_dir (use "gF" to view): ../lsp/denols.lua:67
+- on_attach (use "gF" to view): ../lsp/denols.lua:98
+- root_dir (use "gF" to view): ../lsp/denols.lua:98
- settings: >lua
{
deno = {
@@ -2624,7 +2688,7 @@ Default config:
- cmd: >lua
{ "emmet-language-server", "--stdio" }
- filetypes: >lua
- { "astro", "css", "eruby", "html", "htmlangular", "htmldjango", "javascriptreact", "less", "pug", "sass", "scss", "svelte", "templ", "typescriptreact", "vue" }
+ { "astro", "css", "eruby", "html", "htmlangular", "htmldjango", "javascriptreact", "less", "sass", "scss", "svelte", "typescriptreact", "vue" }
- root_markers: >lua
{ ".git" }
<
@@ -2703,35 +2767,6 @@ Default config:
<
------------------------------------------------------------------------------
-erlangls
-
-https://erlang-ls.github.io
-
-Language Server for Erlang.
-
-Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls)
-Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin`
-
-Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls).
-
-Installation requirements:
- - [Erlang OTP 21+](https://github.com/erlang/otp)
- - [rebar3 3.9.1+](https://github.com/erlang/rebar3)
-
-Snippet to enable the language server: >lua
- vim.lsp.enable('erlangls')
-
-
-Default config:
-- cmd: >lua
- { "erlang_ls" }
-- filetypes: >lua
- { "erlang" }
-- root_markers: >lua
- { "rebar.config", "erlang.mk", ".git" }
-<
-
-------------------------------------------------------------------------------
esbonio
https://github.com/swyddfa/esbonio
@@ -2820,16 +2855,32 @@ You can use a different version of ESLint in each package, but it is recommended
/!\ When using flat config files, you need to use them across all your packages in your monorepo, as it's a global setting for the server.
+### Flat config in ESLint versions prior to 10.0
+
+If you're using a ESLint version that supports both flat config and eslintrc (>= 8.21, < 10.0) and want to change
+the [default behavior](https://eslint.org/blog/2023/10/flat-config-rollout-plans/), you'll need to set
+`experimental.useFlatConfig` accordingly >lua
+ vim.lsp.config("eslint", {
+ settings = {
+ experimental = {
+ -- If you want to use flat config on >= 8.21, < 9.0
+ useFlatConfig = true,
+ -- Or if you want to use eslintrc on 9.*
+ -- useFlatConfig = false,
+ }
+ }
+ })
+
Snippet to enable the language server: >lua
vim.lsp.enable('eslint')
Default config:
-- before_init (use "gF" to view): ../lsp/eslint.lua:61
+- before_init (use "gF" to view): ../lsp/eslint.lua:79
- cmd: >lua
{ "vscode-eslint-language-server", "--stdio" }
- filetypes: >lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx", "vue", "svelte", "astro", "htmlangular" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro", "htmlangular" }
- handlers: >lua
{
["eslint/confirmESLintExecution"] = <function 1>,
@@ -2837,8 +2888,8 @@ Default config:
["eslint/openDoc"] = <function 3>,
["eslint/probeFailed"] = <function 4>
}
-- on_attach (use "gF" to view): ../lsp/eslint.lua:61
-- root_dir (use "gF" to view): ../lsp/eslint.lua:61
+- on_attach (use "gF" to view): ../lsp/eslint.lua:79
+- root_dir (use "gF" to view): ../lsp/eslint.lua:79
- settings: >lua
{
codeAction = {
@@ -2854,9 +2905,7 @@ Default config:
enable = false,
mode = "all"
},
- experimental = {
- useFlatConfig = false
- },
+ experimental = {},
format = true,
nodePath = "",
onIgnoredFiles = "off",
@@ -3014,7 +3063,7 @@ Snippet to enable the language server: >lua
Default config:
- cmd (use "gF" to view): ../lsp/flow.lua:16
- filetypes: >lua
- { "javascript", "javascriptreact", "javascript.jsx" }
+ { "javascript", "javascriptreact" }
- root_markers: >lua
{ ".flowconfig" }
<
@@ -3060,6 +3109,38 @@ Default config:
<
------------------------------------------------------------------------------
+fortitude
+
+https://fortitude.readthedocs.io/en/stable/
+
+Fortitude is a Fortran linter built in Rust and inspired by (and build upon) Ruff
+>sh
+ # Install With uv:
+ uv tool install fortitude-lint@latest
+
+ # Install with pip:
+ pip install fortitude-lint
+
+**LSP is available in Fortitude `v0.8.0`.**
+
+Refer to the [documentation](https://fortitude.readthedocs.io/en/stable/editors/) for more details.
+
+Snippet to enable the language server: >lua
+ vim.lsp.enable('fortitude')
+
+
+Default config:
+- cmd: >lua
+ { "fortitude", "server" }
+- filetypes: >lua
+ { "fortran" }
+- root_markers: >lua
+ { "fpm.toml", "fortitude.toml", ".fortitude.toml", ".git" }
+- settings: >lua
+ {}
+<
+
+------------------------------------------------------------------------------
fortls
https://fortls.fortran-lang.org/index.html
@@ -3082,7 +3163,7 @@ Default config:
- filetypes: >lua
{ "fortran" }
- root_markers: >lua
- { ".fortls", ".git" }
+ { ".fortls", ".fortlsrc", ".fortls.json", ".git" }
- settings: >lua
{}
<
@@ -3461,20 +3542,20 @@ Default config:
{
editorInfo = {
name = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
editorPluginInfo = {
name = "Neovim LSP",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
extension = {
name = "Neovim LSP Client",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
},
ide = {
name = "Neovim",
vendor = "Neovim",
- version = "0.12.0-dev+g03377b9552"
+ version = "0.12.0-dev+g61f166ec40"
}
}
- on_attach (use "gF" to view): ../lsp/gitlab_duo.lua:317
@@ -3655,6 +3736,27 @@ Default config:
<
------------------------------------------------------------------------------
+gn_language_server
+
+https://github.com/google/gn-language-server
+
+A language server for GN, the build configuration language used in Chromium,
+Fuchsia, and other projects.
+
+Snippet to enable the language server: >lua
+ vim.lsp.enable('gn_language_server')
+
+
+Default config:
+- cmd: >lua
+ { "gn-language-server", "--stdio" }
+- filetypes: >lua
+ { "gn" }
+- root_markers: >lua
+ { ".gn", ".git" }
+<
+
+------------------------------------------------------------------------------
gnls
https://github.com/microsoft/gnls
@@ -3707,7 +3809,7 @@ Default config:
{ "go", "gomod" }
- init_options: >lua
{
- command = { "golangci-lint", "run", "--output.json.path=stdout", "--show-stats=false" }
+ command = { "golangci-lint", "run", "--output.text.path=", "--output.tab.path=", "--output.html.path=", "--output.checkstyle.path=", "--output.junit-xml.path=", "--output.teamcity.path=", "--output.sarif.path=", "--show-stats=false", "--output.json.path=stdout" }
}
- root_markers: >lua
{ ".golangci.yml", ".golangci.yaml", ".golangci.toml", ".golangci.json", "go.work", "go.mod", ".git" }
@@ -4172,7 +4274,7 @@ Default config:
- cmd: >lua
{ "vscode-html-language-server", "--stdio" }
- filetypes: >lua
- { "html", "templ" }
+ { "html" }
- init_options: >lua
{
configurationSection = { "html", "css", "javascript" },
@@ -4353,6 +4455,14 @@ Default config:
{ "php" }
- root_markers: >lua
{ ".git", "composer.json" }
+- settings: >lua
+ {
+ intelephense = {
+ telemetry = {
+ enabled = false
+ }
+ }
+ }
<
------------------------------------------------------------------------------
@@ -4599,6 +4709,11 @@ Note: In order to have LanguageServer.jl pick up installed packages or dependenc
Julia project, you must make sure that the project is instantiated >sh
julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()'
+To activate a Julia environment, use the `:LspJuliaActivateEnv` command. A prompt will ask you to select a Julia
+environment from the list of environments found in the current working directory and the `environments/` folder of
+`$JULIA_DEPOT_PATH` entries. You can also provide a path to a Julia environment directly.
+Example: `:LspJuliaActivateEnv /path/to/my/project`.
+
Note: The julia programming language searches for global environments within the `environments/`
folder of `$JULIA_DEPOT_PATH` entries. By default this simply `~/.julia/environments`
@@ -4611,7 +4726,7 @@ Default config:
{ "julia", "--startup-file=no", "--history-file=no", "-e", ' # Load LanguageServer.jl: attempt to load from ~/.julia/environments/nvim-lspconfig\n # with the regular load path as a fallback\n ls_install_path = joinpath(\n get(DEPOT_PATH, 1, joinpath(homedir(), ".julia")),\n "environments", "nvim-lspconfig"\n )\n pushfirst!(LOAD_PATH, ls_install_path)\n using LanguageServer, SymbolServer, StaticLint\n popfirst!(LOAD_PATH)\n depot_path = get(ENV, "JULIA_DEPOT_PATH", "")\n project_path = let\n dirname(something(\n ## 1. Finds an explicitly set project (JULIA_PROJECT)\n Base.load_path_expand((\n p = get(ENV, "JULIA_PROJECT", nothing);\n p === nothing ? nothing : isempty(p) ? nothing : p\n )),\n ## 2. Look for a Project.toml file in the current working directory,\n ## or parent directories, with $HOME as an upper boundary\n Base.current_project(),\n ## 3. First entry in the load path\n get(Base.load_path(), 1, nothing),\n ## 4. Fallback to default global environment,\n ## this is more or less unreachable\n Base.load_path_expand("@v#.#"),\n ))\n end\n @info "Running language server" VERSION pwd() project_path depot_path\n server = LanguageServer.LanguageServerInstance(stdin, stdout, project_path, depot_path)\n server.runlinter = true\n run(server)\n ' }
- filetypes: >lua
{ "julia" }
-- on_attach (use "gF" to view): ../lsp/julials.lua:121
+- on_attach (use "gF" to view): ../lsp/julials.lua:127
- root_markers: >lua
{ "Project.toml", "JuliaProject.toml" }
<
@@ -4637,6 +4752,52 @@ Default config:
<
------------------------------------------------------------------------------
+kakehashi
+
+https://github.com/atusy/kakehashi
+
+Tree-sitter-based language server that provides semantic tokens, selection ranges,
+and LSP bridging for embedded languages (e.g., code blocks in Markdown).
+
+kakehashi works with any language that has a Tree-sitter grammar.
+Parsers and queries are automatically installed on first use
+when `autoInstall` is enabled (the default). This requires the
+`tree-sitter` CLI, a C compiler, and Git.
+
+**You must specify `filetypes` in your call to `vim.lsp.config`** to
+restrict which files activate the server:
+>lua
+ vim.lsp.config('kakehashi', {
+ filetypes = { 'markdown', 'lua', 'rust', 'python' },
+ init_options = {
+ autoInstall = true,
+ -- Optional: bridge LSP requests in injection regions
+ languageServers = {
+ ['lua_ls'] = {
+ cmd = { 'lua-language-server' },
+ languages = { 'lua' },
+ },
+ },
+ languages = {
+ markdown = {
+ bridge = { lua_ls = { enabled = true } },
+ },
+ },
+ },
+ })
+
+Snippet to enable the language server: >lua
+ vim.lsp.enable('kakehashi')
+
+
+Default config:
+- cmd: >lua
+ { "kakehashi" }
+- root_markers: >lua
+ { "kakehashi.toml", ".git" }
+<
+
+------------------------------------------------------------------------------
kcl
https://github.com/kcl-lang/kcl.nvim
@@ -5024,25 +5185,23 @@ settings.
workspace = {
checkThirdParty = false,
library = {
- vim.env.VIMRUNTIME
+ vim.env.VIMRUNTIME,
-- Depending on the usage, you might want to add additional paths
-- here.
- -- '${3rd}/luv/library'
- -- '${3rd}/busted/library'
- }
+ -- '${3rd}/luv/library',
+ -- '${3rd}/busted/library',
+ },
-- Or pull in all of 'runtimepath'.
-- NOTE: this is a lot slower and will cause issues when working on
-- your own configuration.
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
- -- library = {
- -- vim.api.nvim_get_runtime_file('', true),
- -- }
- }
+ -- library = vim.api.nvim_get_runtime_file('', true),
+ },
})
end,
settings = {
- Lua = {}
- }
+ Lua = {},
+ },
})
See `lua-language-server`'s [documentation](https://luals.github.io/wiki/settings/) for an explanation of the above fields:
@@ -5059,7 +5218,7 @@ Default config:
- filetypes: >lua
{ "lua" }
- root_markers: >lua
- { ".emmyrc.json", ".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml", ".git" }
+ { { ".emmyrc.json", ".luarc.json", ".luarc.jsonc" }, { ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml" }, { ".git" } }
- settings: >lua
{
Lua = {
@@ -5693,7 +5852,7 @@ Default config:
- filetypes: >lua
{ "cmake" }
- root_markers: >lua
- { ".git", "build", "cmake" }
+ { ".neocmake.toml", ".git", "build", "cmake" }
<
------------------------------------------------------------------------------
@@ -6170,25 +6329,100 @@ Default config:
<
------------------------------------------------------------------------------
+oso
+
+https://www.osohq.com/docs/develop/local-dev/env-setup
+
+Oso Polar language server.
+
+`oso-cloud` can be installed by following the instructions
+[here](https://www.osohq.com/docs/develop/local-dev/env-setup).
+
+The default `cmd` assumes that the `oso-cloud` binary can be found in the `$PATH`.
+
+You may need to configure the filetype for Polar (*.polar) files:
+>
+ autocmd BufNewFile,BufRead *.polar set filetype=polar
+
+or
+
+```lua
+vim.filetype.add({
+ pattern = {
+ ['.*/*.polar'] = 'polar',
+ },
+})
+
+Alternatively, you may use a syntax plugin like https://github.com/osohq/polar.vim
+
+Snippet to enable the language server: >lua
+ vim.lsp.enable('oso')
+
+
+Default config:
+- cmd: >lua
+ { "oso-cloud", "lsp" }
+- filetypes: >lua
+ { "polar" }
+<
+
+------------------------------------------------------------------------------
+oxfmt
+
+https://github.com/oxc-project/oxc
+https://oxc.rs/docs/guide/usage/formatter.html
+
+`oxfmt` is a Prettier-compatible code formatter that supports multiple languages
+including JavaScript, TypeScript, JSON, YAML, HTML, CSS, Markdown, and more.
+It can be installed via `npm`:
+>sh
+ npm i -g oxfmt
+
+Snippet to enable the language server: >lua
+ vim.lsp.enable('oxfmt')
+
+
+Default config:
+- cmd (use "gF" to view): ../lsp/oxfmt.lua:17
+- filetypes: >lua
+ { "javascript", "javascriptreact", "typescript", "typescriptreact", "toml", "json", "jsonc", "json5", "yaml", "html", "vue", "handlebars", "css", "scss", "less", "graphql", "markdown" }
+- root_dir (use "gF" to view): ../lsp/oxfmt.lua:17
+- `workspace_required` : `true`
+<
+
+------------------------------------------------------------------------------
oxlint
https://github.com/oxc-project/oxc
+https://oxc.rs/docs/guide/usage/linter.html
-`oxc` is a linter / formatter for JavaScript / Typescript supporting over 500 rules from ESLint and its popular plugins
+`oxlint` is a linter for JavaScript / TypeScript supporting over 500 rules from ESLint and its popular plugins.
+It also supports linting framework files (Vue, Svelte, Astro) by analyzing their <script> blocks.
It can be installed via `npm`:
>sh
npm i -g oxlint
+Type-aware linting will automatically be enabled if `tsgolint` exists in your
+path and your `.oxlintrc.json` contains the string "typescript".
+
+The default `on_attach` function provides an `:LspOxlintFixAll` command which
+can be used to fix all fixable diagnostics. See the `eslint` config entry for
+an example of how to use this to automatically fix all errors on write.
+
Snippet to enable the language server: >lua
vim.lsp.enable('oxlint')
Default config:
-- cmd: >lua
- { "oxc_language_server" }
+- before_init (use "gF" to view): ../lsp/oxlint.lua:32
+- cmd (use "gF" to view): ../lsp/oxlint.lua:32
- filetypes: >lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
-- root_dir (use "gF" to view): ../lsp/oxlint.lua:15
+ { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte", "astro" }
+- on_attach (use "gF" to view): ../lsp/oxlint.lua:32
+- root_markers: >lua
+ { ".oxlintrc.json", "oxlint.config.ts" }
+- settings: >lua
+ {}
- `workspace_required` : `true`
<
@@ -6519,6 +6753,61 @@ Default config:
<
------------------------------------------------------------------------------
+pony_language_server
+
+Renamed to [pony_lsp](#pony_lsp)
+
+Snippet to enable the language server: >lua
+ vim.lsp.enable('pony_language_server')
+
+
+Default config:
+- cmd: >lua
+ { "pony-lsp" }
+- filetypes: >lua
+ { "pony" }
+- name: >lua
+ "pony_lsp"
+- on_init (use "gF" to view): ../lsp/pony_language_server.lua:6
+- root_markers: >lua
+ { "corral.json", ".git" }
+- settings: >lua
+ {
+ ["pony-lsp"] = {
+ defines = {},
+ ponypath = {}
+ }
+ }
+<
+
+------------------------------------------------------------------------------
+pony_lsp
+
+https://github.com/ponylang/ponyc/tree/main/tools/pony-lsp
+
+Language server for the Pony programming language
+
+Snippet to enable the language server: >lua
+ vim.lsp.enable('pony_lsp')
+
+
+Default config:
+- cmd: >lua
+ { "pony-lsp" }
+- filetypes: >lua
+ { "pony" }
+- root_markers: >lua
+ { "corral.json", ".git" }
+- settings: >lua
+ {
+ ["pony-lsp"] = {
+ defines = {},
+ ponypath = {}
+ }
+ }
+<
+
+------------------------------------------------------------------------------
poryscript_pls
https://github.com/huderlem/poryscript-pls
@@ -7390,7 +7679,7 @@ Default config:
- cmd: >lua
{ "rome", "lsp-proxy" }
- filetypes: >lua
- { "javascript", "javascriptreact", "json", "typescript", "typescript.tsx", "typescriptreact" }
+ { "javascript", "javascriptreact", "json", "typescript", "typescriptreact" }
- root_markers: >lua
{ "package.json", "node_modules", ".git" }
<
@@ -7436,7 +7725,7 @@ Default config:
}
}
- cmd: >lua
- { "Microsoft.CodeAnalysis.LanguageServer", "--logLevel", "Information", "--extensionLogDirectory", "/tmp/roslyn_ls/logs", "--stdio" }
+ { "roslyn-language-server", "--logLevel", "Information", "--extensionLogDirectory", "/tmp/roslyn_ls/logs", "--stdio" }
- commands: >lua
{
["roslyn.client.completionComplexEdit"] = <function 1>
@@ -7453,10 +7742,10 @@ Default config:
"roslyn_ls"
- offset_encoding: >lua
"utf-8"
-- on_attach (use "gF" to view): ../lsp/roslyn_ls.lua:102
+- on_attach (use "gF" to view): ../lsp/roslyn_ls.lua:112
- on_init: >lua
{ <function 1> }
-- root_dir (use "gF" to view): ../lsp/roslyn_ls.lua:102
+- root_dir (use "gF" to view): ../lsp/roslyn_ls.lua:112
- settings: >lua
{
["csharp|background_analysis"] = {
@@ -7553,8 +7842,7 @@ Snippet to enable the language server: >lua
Default config:
-- cmd: >lua
- { "ruby-lsp" }
+- cmd (use "gF" to view): ../lsp/ruby_lsp.lua:16
- filetypes: >lua
{ "ruby", "eruby" }
- init_options: >lua
@@ -7709,7 +7997,7 @@ Snippet to enable the language server: >lua
Default config:
-- before_init (use "gF" to view): ../lsp/rust_analyzer.lua:56
+- before_init (use "gF" to view): ../lsp/rust_analyzer.lua:85
- capabilities: >lua
{
experimental = {
@@ -7723,8 +8011,8 @@ Default config:
{ "rust-analyzer" }
- filetypes: >lua
{ "rust" }
-- on_attach (use "gF" to view): ../lsp/rust_analyzer.lua:56
-- root_dir (use "gF" to view): ../lsp/rust_analyzer.lua:56
+- on_attach (use "gF" to view): ../lsp/rust_analyzer.lua:85
+- root_dir (use "gF" to view): ../lsp/rust_analyzer.lua:85
- settings: >lua
{
["rust-analyzer"] = {
@@ -7952,7 +8240,7 @@ Default config:
- filetypes: >lua
{ "hlsl", "shaderslang" }
- root_markers: >lua
- { ".git" }
+ { "slangdconfig.json", ".clang-format", ".git" }
<
------------------------------------------------------------------------------
@@ -8090,7 +8378,51 @@ snyk_ls
https://github.com/snyk/snyk-ls
-LSP for Snyk Open Source, Snyk Infrastructure as Code, and Snyk Code.
+**[Snyk](https://snyk.io)** is a developer security platform that helps you find and fix
+vulnerabilities in your code, open source dependencies, containers, and infrastructure as code.
+
+The Snyk Language Server provides real-time security scanning for:
+- **Snyk Open Source**: Find and fix vulnerabilities in open source dependencies
+- **Snyk Code**: Find and fix security vulnerabilities in your code
+- **Snyk Infrastructure as Code**: Find and fix security issues in Kubernetes, Terraform, and other IaC files
+
+## Authentication
+
+**Note**: Currently, only token-based authentication is supported in Neovim.
+
+1. Get your API token from https://app.snyk.io/account
+2. Set the `SNYK_TOKEN` environment variable:
+ ```sh
+ export SNYK_TOKEN="your-token-here"
+ ```
+
+## Trusted Folders
+
+Snyk requires you to trust directories before scanning them. To avoid being prompted every time:
+>lua
+ vim.lsp.config('snyk_ls', {
+ init_options = {
+ trustedFolders = {
+ '/Users/yourname/projects', -- Trust your projects directory
+ '/path/to/another/trusted/dir',
+ },
+ },
+ })
+
+**Important**: Trust the top-level directory where you store your repositories, not individual repos.
+For example, if you work on `/Users/yourname/projects/my-app`, trust `/Users/yourname/projects`.
+Only trust directories containing code you trust to scan.
+
+## Configuration
+
+Full configuration options available at https://github.com/snyk/snyk-ls#configuration-1
+
+### Advanced Configuration
+
+For **non-default multi-tenant or single-tenant setups**, you may need to specify:
+
+- `endpoint`: Custom Snyk API endpoint (e.g., `https://api.eu.snyk.io` for EU, or your single-tenant URL)
+```
Snippet to enable the language server: >lua
vim.lsp.enable('snyk_ls')
@@ -8098,12 +8430,18 @@ Snippet to enable the language server: >lua
Default config:
- cmd: >lua
- { "snyk-ls" }
+ { "snyk", "language-server", "-l", "info" }
- filetypes: >lua
- { "go", "gomod", "javascript", "typescript", "json", "python", "requirements", "helm", "yaml", "terraform", "terraform-vars" }
+ { "apex", "apexcode", "c", "cpp", "cs", "dart", "dockerfile", "elixir", "eelixir", "go", "gomod", "groovy", "helm", "java", "javascript", "json", "kotlin", "objc", "objcpp", "php", "python", "requirements", "ruby", "rust", "scala", "swift", "terraform", "terraform-vars", "typescript", "yaml" }
- init_options: >lua
{
- activateSnykCode = "true"
+ activateSnykCode = "false",
+ activateSnykIac = "true",
+ activateSnykOpenSource = "true",
+ integrationName = "Neovim",
+ integrationVersion = "0.12.0-dev+g61f166ec40",
+ token = vim.NIL,
+ trustedFolders = {}
}
- root_markers: >lua
{ ".git", ".snyk" }
@@ -8878,14 +9216,21 @@ Default config:
------------------------------------------------------------------------------
systemd_ls
-loop or previous error loading module 'lsp.systemd_ls'
+Renamed to [systemd_lsp](#systemd_lsp)
Snippet to enable the language server: >lua
vim.lsp.enable('systemd_ls')
Default config:
-
+- cmd: >lua
+ { "systemd-lsp" }
+- filetypes: >lua
+ { "systemd" }
+- name: >lua
+ "systemd_lsp"
+- on_init (use "gF" to view): ../lsp/systemd_ls.lua:6
+<
------------------------------------------------------------------------------
systemd_lsp
@@ -9520,6 +9865,35 @@ This works without the need of spawning multiple instances of `ts_ls`, saving me
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
+Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
+mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
+or deno.jsonc.
+
+Example:
+>
+ project-root
+ +-- node_modules/...
+ +-- package-lock.json
+ +-- package.json
+ +-- packages
+ +-- deno-module
+ | +-- deno.json
+ | +-- package.json <-- It's normal for Deno projects to have package.json files!
+ | +-- src
+ | +-- index.ts <-- this is a Deno file
+ +-- node-module
+ +-- package.json
+ +-- src
+ +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
+
+From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
+If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
+Otherwise, attach at PROJECT ROOT, or the cwd if not found.
+
Snippet to enable the language server: >lua
vim.lsp.enable('ts_ls')
@@ -9535,7 +9909,7 @@ Default config:
["editor.action.showReferences"] = <function 1>
}
- filetypes: >lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
- handlers: >lua
{
["_typescript.rename"] = <function 1>
@@ -9544,8 +9918,8 @@ Default config:
{
hostInfo = "neovim"
}
-- on_attach (use "gF" to view): ../lsp/ts_ls.lua:47
-- root_dir (use "gF" to view): ../lsp/ts_ls.lua:47
+- on_attach (use "gF" to view): ../lsp/ts_ls.lua:77
+- root_dir (use "gF" to view): ../lsp/ts_ls.lua:77
<
------------------------------------------------------------------------------
@@ -9606,15 +9980,44 @@ This works without the need of spawning multiple instances of `tsgo`, saving mem
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
+Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
+mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
+or deno.jsonc.
+
+Example:
+>
+ project-root
+ +-- node_modules/...
+ +-- package-lock.json
+ +-- package.json
+ +-- packages
+ +-- deno-module
+ | +-- deno.json
+ | +-- package.json <-- It's normal for Deno projects to have package.json files!
+ | +-- src
+ | +-- index.ts <-- this is a Deno file
+ +-- node-module
+ +-- package.json
+ +-- src
+ +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
+
+From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
+If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
+Otherwise, attach at PROJECT ROOT, or the cwd if not found.
+
Snippet to enable the language server: >lua
vim.lsp.enable('tsgo')
Default config:
-- cmd (use "gF" to view): ../lsp/tsgo.lua:18
+- cmd (use "gF" to view): ../lsp/tsgo.lua:48
- filetypes: >lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
-- root_dir (use "gF" to view): ../lsp/tsgo.lua:18
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
+- root_dir (use "gF" to view): ../lsp/tsgo.lua:48
<
------------------------------------------------------------------------------
@@ -10015,7 +10418,7 @@ Default config:
------------------------------------------------------------------------------
vala_ls
-https://github.com/Prince781/vala-language-server
+https://github.com/vala-lang/vala-language-server
Snippet to enable the language server: >lua
vim.lsp.enable('vala_ls')
@@ -10345,7 +10748,7 @@ Default config:
{ "vue" }
- name: >lua
"vue_ls"
-- on_init (use "gF" to view): ../lsp/volar.lua:9
+- on_init (use "gF" to view): ../lsp/volar.lua:6
- root_markers: >lua
{ "package.json" }
<
@@ -10366,6 +10769,7 @@ Default config:
{ "coq" }
- name: >lua
"vsrocq"
+- on_init (use "gF" to view): ../lsp/vscoqtop.lua:6
- root_markers: >lua
{ "_RocqProject", "_CoqProject", ".git" }
<
@@ -10450,6 +10854,8 @@ This works without the need of spawning multiple instances of `vtsls`, saving me
It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
+This includes the same Deno-excluding logic from `ts_ls`. It is not recommended to enable both `vtsls` and `ts_ls` at the same time!
+
Snippet to enable the language server: >lua
vim.lsp.enable('vtsls')
@@ -10458,12 +10864,12 @@ Default config:
- cmd: >lua
{ "vtsls", "--stdio" }
- filetypes: >lua
- { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" }
+ { "javascript", "javascriptreact", "typescript", "typescriptreact" }
- init_options: >lua
{
hostInfo = "neovim"
}
-- root_dir (use "gF" to view): ../lsp/vtsls.lua:69
+- root_dir (use "gF" to view): ../lsp/vtsls.lua:71
<
------------------------------------------------------------------------------
diff --git a/doc/lspconfig.txt b/doc/lspconfig.txt
index 492040e8..04dcde73 100644
--- a/doc/lspconfig.txt
+++ b/doc/lspconfig.txt
@@ -1,6 +1,5 @@
-*lspconfig.txt* For Nvim version 0.10+
-
-nvim-lspconfig provides user-contributed configs for the Nvim |lsp| client.
+*lspconfig.txt* User-contributed configs for the Nvim |lsp| client
+ For Nvim version 0.10+
Type |gO| to see the table of contents.
@@ -64,6 +63,24 @@ nvim-lspconfig interface:
- `on_new_config` is currently missing, see https://github.com/neovim/neovim/issues/32287
- However, defining `root_dir` as a function is very flexible and may fit
your use-case instead. https://github.com/neovim/neovim/issues/32037#issuecomment-2825599872
+- `root_dir` usages akin to >lua
+
+ root_dir = require'lspconfig.util'.root_pattern(...)
+<
+
+ should be updated:
+ - If the patterns passed to `root_pattern` contain no wildcards, then
+ `root_markers` (see |lsp-root_markers|) is likely sufficient.
+ - Otherwise, `root_pattern` can still be employed (for the time being,
+ see https://github.com/neovim/nvim-lspconfig/issues/3768), but the usage
+ should be as follows (see |lsp-root_dir|): >lua
+
+ root_dir = function(bufnr, on_dir)
+ local fname = vim.api.nvim_buf_get_name(bufnr)
+ on_dir(require'lspconfig.util'.root_pattern(...)(fname))
+ end
+<
+
==============================================================================
COMMANDS *lspconfig-commands*
@@ -91,22 +108,21 @@ Launches the requested (configured) client, but only if it successfully
resolves a root directory. Note: Defaults to all configured servers matching
the current buffer filetype.
-:LspStop [client_id] or [config_name] *:LspStop*
+:LspStop [config_name] *:LspStop*
Note: Use `:lsp disable` with Nvim 0.12+. |:lsp-disable|
-Stops the server with the given client-id or config name. Defaults to
-stopping all servers active on the current buffer. To force stop language
-servers: >vim
+Stops the server with the given config name. Defaults to stopping all servers
+active on the current buffer. To force stop language servers: >vim
:LspStop!
-:LspRestart [client_id] or [config_name] *:LspRestart*
+:LspRestart [config_name] *:LspRestart*
Note: Use `:lsp restart` with Nvim 0.12+. |:lsp-restart|
-Restarts the client with the given client-id or config name, and attempts
-to reattach to all previously attached buffers. Defaults to restarting all
-active servers. To force stop language servers when restarting: >vim
+Restarts the client with the given config name, and attempts to reattach to
+all previously attached buffers. Defaults to restarting all active servers. To
+force stop language servers when restarting: >vim
:LspRestart!
==============================================================================
diff --git a/lsp/angularls.lua b/lsp/angularls.lua
index af82b87a..6d51cd16 100644
--- a/lsp/angularls.lua
+++ b/lsp/angularls.lua
@@ -85,7 +85,7 @@ local function get_angular_core_version(root_dir)
local json = vim.json.decode(content) or {}
- local version = (json.dependencies or {})['@angular/core'] or ''
+ local version = (json.dependencies or {})['@angular/core'] or (json.devDependencies or {})['@angular/core'] or ''
return version:match('%d+%.%d+%.%d+') or ''
end
@@ -118,6 +118,6 @@ return {
return vim.lsp.rpc.start(cmd, dispatchers)
end,
- filetypes = { 'typescript', 'html', 'typescriptreact', 'typescript.tsx', 'htmlangular' },
+ filetypes = { 'typescript', 'html', 'typescriptreact', 'htmlangular' },
root_markers = { 'angular.json', 'nx.json' },
}
diff --git a/lsp/astro.lua b/lsp/astro.lua
index a85aae39..c9fc4c1c 100644
--- a/lsp/astro.lua
+++ b/lsp/astro.lua
@@ -6,6 +6,42 @@
--- ```sh
--- npm install -g @astrojs/language-server
--- ```
+---
+--- If typescript is installed globally, you might get the `\`typescript.tsdk\` init option is required` error.
+--- You will need to manually pass the typescript SDK path. Here is an example of a Nix configuration where typescript is installed via Nix's Home-manager:
+---
+--- ```nix
+--- { config, pkgs, ... }:
+---
+--- {
+--- home.packages = with pkgs; [
+--- typescript
+--- ];
+---
+--- programs.neovim = {
+--- plugins = with pkgs.vimPlugins; [
+--- nvim-lspconfig
+--- ];
+--- extraPackages = with pkgs; [
+--- astro-language-server
+--- ];
+--- initLua = ''
+--- vim.lsp.config['astro'] = {
+--- init_options = {
+--- typescript = {
+--- tsdk = ${pkgs.typescript}/lib/node_modules/typescript/lib,
+--- },
+--- },
+--- }
+---
+--- vim.lsp.enable('astro')
+---
+--- -- ...
+--- '';
+--- };
+--- }
+--- ```
+--- The path can also be passed via a variable, like `vim.g.tsdk = "${pkgs.typescript}/lib/node_modules/typescript/lib"` and then used in the Lua Neovim config.
local util = require 'lspconfig.util'
diff --git a/lsp/basedpyright.lua b/lsp/basedpyright.lua
index 8ae1a06b..fee784e7 100644
--- a/lsp/basedpyright.lua
+++ b/lsp/basedpyright.lua
@@ -38,8 +38,11 @@ return {
basedpyright = {
analysis = {
autoSearchPaths = true,
- useLibraryCodeForTypes = true,
diagnosticMode = 'openFilesOnly',
+ -- https://docs.basedpyright.com/latest/configuration/language-server-settings/
+ -- Explicitly setting `basedpyright.analysis.useLibraryCodeForTypes` is **discouraged** by the official docs.
+ -- Because it will override per-project configurations like `pyproject.toml`.
+ -- If left unset, its default value is `true`, and it can be correctly overridden by project config files.
},
},
},
diff --git a/lsp/biome.lua b/lsp/biome.lua
index 3ea79189..8dc91cf2 100644
--- a/lsp/biome.lua
+++ b/lsp/biome.lua
@@ -34,7 +34,6 @@ return {
'jsonc',
'svelte',
'typescript',
- 'typescript.tsx',
'typescriptreact',
'vue',
},
@@ -44,16 +43,18 @@ return {
-- As stated in the documentation above, this LSP supports monorepos and simple projects.
-- We select then from the project root, which is identified by the presence of a package
-- manager lock file.
- local root_markers = { 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock' }
+ local root_markers = {
+ 'package-lock.json',
+ 'yarn.lock',
+ 'pnpm-lock.yaml',
+ 'bun.lockb',
+ 'bun.lock',
+ 'deno.lock',
+ }
-- Give the root markers equal priority by wrapping them in a table
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
or vim.list_extend(root_markers, { '.git' })
- -- exclude deno
- if vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc', 'deno.lock' }) then
- return
- end
-
-- We fallback to the current working directory if no project root is found
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
diff --git a/lsp/clangd.lua b/lsp/clangd.lua
index 07ad3470..c1abda42 100644
--- a/lsp/clangd.lua
+++ b/lsp/clangd.lua
@@ -74,6 +74,10 @@ return {
'configure.ac', -- AutoTools
'.git',
},
+ get_language_id = function(_, ftype)
+ local t = { objc = 'objective-c', objcpp = 'objective-cpp', cuda = 'cuda-cpp' }
+ return t[ftype] or ftype
+ end,
capabilities = {
textDocument = {
completion = {
diff --git a/lsp/codebook.lua b/lsp/codebook.lua
index dea265c5..ec8931f7 100644
--- a/lsp/codebook.lua
+++ b/lsp/codebook.lua
@@ -28,10 +28,12 @@ return {
'python',
'ruby',
'rust',
+ 'swift',
'toml',
'text',
'typescript',
'typescriptreact',
+ 'zig',
},
root_markers = { '.git', 'codebook.toml', '.codebook.toml' },
}
diff --git a/lsp/csharp_ls.lua b/lsp/csharp_ls.lua
index dd8c427a..e284090b 100644
--- a/lsp/csharp_ls.lua
+++ b/lsp/csharp_ls.lua
@@ -29,4 +29,10 @@ return {
init_options = {
AutomaticWorkspaceInit = true,
},
+ get_language_id = function(_, ft)
+ if ft == 'cs' then
+ return 'csharp'
+ end
+ return ft
+ end,
}
diff --git a/lsp/denols.lua b/lsp/denols.lua
index b5d9ffe2..b3b6af72 100644
--- a/lsp/denols.lua
+++ b/lsp/denols.lua
@@ -12,6 +12,37 @@
--- "ts=typescript"
--- }
--- ```
+---
+--- Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+--- expects to run in Node or Web Browsers. This supports having a Deno module that is a part of a mostly-not-Deno
+--- monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json or deno.jsonc.
+--- Note that this means that without a deno.json, deno.jsonc, or deno.lock file, this LSP client will not attach.
+---
+--- Example:
+---
+--- ```
+--- project-root
+--- +-- node_modules/...
+--- +-- package-lock.json
+--- +-- package.json
+--- +-- packages
+--- +-- deno-module
+--- | +-- deno.json
+--- | +-- package.json <-- It's normal for Deno projects to have package.json files!
+--- | +-- src
+--- | +-- index.ts <-- this is a Deno file
+--- +-- node-module
+--- +-- package.json
+--- +-- src
+--- +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgo)
+--- ```
+---
+--- From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+--- From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+--- From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+--- If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we attach.
+--- If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we attach.
+--- Otherwise, we abort, because this is a non-Deno TS file.
local lsp = vim.lsp
@@ -70,28 +101,28 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = function(bufnr, on_dir)
-- The project root is where the LSP can be started from
- local root_markers = { 'deno.lock' }
+ local root_markers = { 'deno.lock', 'deno.json', 'deno.jsonc' }
-- Give the root markers equal priority by wrapping them in a table
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
or vim.list_extend(root_markers, { '.git' })
- -- exclude non-deno projects (npm, yarn, pnpm, bun)
- local non_deno_path = vim.fs.root(
- bufnr,
- { 'package.json', 'package-lock.json', 'yarn.lock', 'pnpm-lock.yaml', 'bun.lockb', 'bun.lock' }
- )
+ -- only include deno projects
+ local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' })
+ local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' })
local project_root = vim.fs.root(bufnr, root_markers)
- if non_deno_path and (not project_root or #non_deno_path >= #project_root) then
- return
+ if
+ (deno_lock_root and (not project_root or #deno_lock_root > #project_root))
+ or (deno_root and (not project_root or #deno_root >= #project_root))
+ then
+ -- deno config is closer than or equal to package manager lock,
+ -- or deno lock is closer than package manager lock. Attach at the project root,
+ -- or deno lock or deno config path. At least one of these is always set at this point.
+ on_dir(project_root or deno_lock_root or deno_root)
end
- -- We fallback to the current working directory if no project root is found
- on_dir(project_root or vim.fn.getcwd())
end,
settings = {
deno = {
diff --git a/lsp/emmet_language_server.lua b/lsp/emmet_language_server.lua
index 89c5f4bb..d508a24d 100644
--- a/lsp/emmet_language_server.lua
+++ b/lsp/emmet_language_server.lua
@@ -19,11 +19,9 @@ return {
'htmldjango',
'javascriptreact',
'less',
- 'pug',
'sass',
'scss',
'svelte',
- 'templ',
'typescriptreact',
'vue',
},
diff --git a/lsp/erlangls.lua b/lsp/erlangls.lua
deleted file mode 100644
index d209d831..00000000
--- a/lsp/erlangls.lua
+++ /dev/null
@@ -1,21 +0,0 @@
----@brief
----
---- https://erlang-ls.github.io
----
---- Language Server for Erlang.
----
---- Clone [erlang_ls](https://github.com/erlang-ls/erlang_ls)
---- Compile the project with `make` and copy resulting binaries somewhere in your $PATH eg. `cp _build/*/bin/* ~/local/bin`
----
---- Installation instruction can be found [here](https://github.com/erlang-ls/erlang_ls).
----
---- Installation requirements:
---- - [Erlang OTP 21+](https://github.com/erlang/otp)
---- - [rebar3 3.9.1+](https://github.com/erlang/rebar3)
-
----@type vim.lsp.Config
-return {
- cmd = { 'erlang_ls' },
- filetypes = { 'erlang' },
- root_markers = { 'rebar.config', 'erlang.mk', '.git' },
-}
diff --git a/lsp/eslint.lua b/lsp/eslint.lua
index a30c349e..1b0d8008 100644
--- a/lsp/eslint.lua
+++ b/lsp/eslint.lua
@@ -38,6 +38,24 @@
--- You can use a different version of ESLint in each package, but it is recommended to use the same version of ESLint in all packages. The location of the ESLint binary will be determined automatically.
---
--- /!\ When using flat config files, you need to use them across all your packages in your monorepo, as it's a global setting for the server.
+---
+--- ### Flat config in ESLint versions prior to 10.0
+---
+--- If you're using a ESLint version that supports both flat config and eslintrc (>= 8.21, < 10.0) and want to change
+--- the [default behavior](https://eslint.org/blog/2023/10/flat-config-rollout-plans/), you'll need to set
+--- `experimental.useFlatConfig` accordingly:
+--- ```lua
+--- vim.lsp.config("eslint", {
+--- settings = {
+--- experimental = {
+--- -- If you want to use flat config on >= 8.21, < 9.0
+--- useFlatConfig = true,
+--- -- Or if you want to use eslintrc on 9.*
+--- -- useFlatConfig = false,
+--- }
+--- }
+--- })
+--- ```
local util = require 'lspconfig.util'
local lsp = vim.lsp
@@ -63,10 +81,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
'vue',
'svelte',
'astro',
@@ -131,9 +147,7 @@ return {
---@diagnostic disable-next-line: assign-type-mismatch
packageManager = nil,
useESLintClass = false,
- experimental = {
- useFlatConfig = false,
- },
+ experimental = {},
codeActionOnSave = {
enable = false,
mode = 'all',
@@ -174,30 +188,6 @@ return {
name = vim.fn.fnamemodify(root_dir, ':t'),
}
- -- Support flat config files
- -- They contain 'config' in the file name
- local flat_config_files = vim.tbl_filter(function(file)
- return file:match('config')
- end, eslint_config_files)
-
- for _, file in ipairs(flat_config_files) do
- local found_files = vim.fn.globpath(root_dir, file, true, true)
-
- -- Filter out files inside node_modules
- local filtered_files = {}
- for _, found_file in ipairs(found_files) do
- if string.find(found_file, '[/\\]node_modules[/\\]') == nil then
- table.insert(filtered_files, found_file)
- end
- end
-
- if #filtered_files > 0 then
- config.settings.experimental = config.settings.experimental or {}
- config.settings.experimental.useFlatConfig = true
- break
- end
- end
-
-- Support Yarn2 (PnP) projects
local pnp_cjs = root_dir .. '/.pnp.cjs'
local pnp_js = root_dir .. '/.pnp.js'
diff --git a/lsp/flow.lua b/lsp/flow.lua
index 92743816..2a887064 100644
--- a/lsp/flow.lua
+++ b/lsp/flow.lua
@@ -24,6 +24,6 @@ return {
return vim.lsp.rpc.start(cmd, dispatchers)
end,
- filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx' },
+ filetypes = { 'javascript', 'javascriptreact' },
root_markers = { '.flowconfig' },
}
diff --git a/lsp/fortitude.lua b/lsp/fortitude.lua
new file mode 100644
index 00000000..5773949d
--- /dev/null
+++ b/lsp/fortitude.lua
@@ -0,0 +1,30 @@
+---@brief
+---
+--- https://fortitude.readthedocs.io/en/stable/
+---
+--- Fortitude is a Fortran linter built in Rust and inspired by (and build upon) Ruff
+---
+--- ```sh
+--- # Install With uv:
+--- uv tool install fortitude-lint@latest
+---
+--- # Install with pip:
+--- pip install fortitude-lint
+--- ```
+---
+--- **LSP is available in Fortitude `v0.8.0`.**
+---
+--- Refer to the [documentation](https://fortitude.readthedocs.io/en/stable/editors/) for more details.
+
+---@type vim.lsp.Config
+return {
+ cmd = { 'fortitude', 'server' },
+ filetypes = { 'fortran' },
+ root_markers = {
+ 'fpm.toml',
+ 'fortitude.toml',
+ '.fortitude.toml',
+ '.git',
+ },
+ settings = {},
+}
diff --git a/lsp/fortls.lua b/lsp/fortls.lua
index c85f4a5d..989a5f8e 100644
--- a/lsp/fortls.lua
+++ b/lsp/fortls.lua
@@ -22,6 +22,6 @@ return {
'--use_signature_help',
},
filetypes = { 'fortran' },
- root_markers = { '.fortls', '.git' },
+ root_markers = { '.fortls', '.fortlsrc', '.fortls.json', '.git' },
settings = {},
}
diff --git a/lsp/fsautocomplete.lua b/lsp/fsautocomplete.lua
index 7e0376bc..c8f5848a 100644
--- a/lsp/fsautocomplete.lua
+++ b/lsp/fsautocomplete.lua
@@ -24,7 +24,7 @@ return {
cmd = { 'fsautocomplete', '--adaptive-lsp-server-enabled' },
root_dir = function(bufnr, on_dir)
local fname = vim.api.nvim_buf_get_name(bufnr)
- on_dir(util.root_pattern('*.sln', '*.fsproj', '.git')(fname))
+ on_dir(util.root_pattern('*.sln', '*.slnx', '*.fsproj', '.git')(fname))
end,
filetypes = { 'fsharp' },
init_options = {
diff --git a/lsp/gn_language_server.lua b/lsp/gn_language_server.lua
new file mode 100644
index 00000000..2bf80a05
--- /dev/null
+++ b/lsp/gn_language_server.lua
@@ -0,0 +1,13 @@
+---@brief
+---
+--- https://github.com/google/gn-language-server
+---
+--- A language server for GN, the build configuration language used in Chromium,
+--- Fuchsia, and other projects.
+
+---@type vim.lsp.Config
+return {
+ cmd = { 'gn-language-server', '--stdio' },
+ filetypes = { 'gn' },
+ root_markers = { '.gn', '.git' },
+}
diff --git a/lsp/golangci_lint_ls.lua b/lsp/golangci_lint_ls.lua
index 8a95035f..84f9e496 100644
--- a/lsp/golangci_lint_ls.lua
+++ b/lsp/golangci_lint_ls.lua
@@ -18,7 +18,22 @@ return {
cmd = { 'golangci-lint-langserver' },
filetypes = { 'go', 'gomod' },
init_options = {
- command = { 'golangci-lint', 'run', '--output.json.path=stdout', '--show-stats=false' },
+ command = {
+ 'golangci-lint',
+ 'run',
+ -- disable all output formats that might be enabled by the users .golangci.yml
+ '--output.text.path=',
+ '--output.tab.path=',
+ '--output.html.path=',
+ '--output.checkstyle.path=',
+ '--output.junit-xml.path=',
+ '--output.teamcity.path=',
+ '--output.sarif.path=',
+ -- disable stats output
+ '--show-stats=false',
+ -- enable JSON output to be used by the language server
+ '--output.json.path=stdout',
+ },
},
root_markers = {
'.golangci.yml',
diff --git a/lsp/html.lua b/lsp/html.lua
index 2b53d324..2ef030bc 100644
--- a/lsp/html.lua
+++ b/lsp/html.lua
@@ -25,7 +25,7 @@
---@type vim.lsp.Config
return {
cmd = { 'vscode-html-language-server', '--stdio' },
- filetypes = { 'html', 'templ' },
+ filetypes = { 'html' },
root_markers = { 'package.json', '.git' },
settings = {},
init_options = {
diff --git a/lsp/intelephense.lua b/lsp/intelephense.lua
index 8a91c401..04fbb95d 100644
--- a/lsp/intelephense.lua
+++ b/lsp/intelephense.lua
@@ -30,4 +30,11 @@ return {
cmd = { 'intelephense', '--stdio' },
filetypes = { 'php' },
root_markers = { '.git', 'composer.json' },
+ settings = {
+ intelephense = {
+ telemetry = {
+ enabled = false,
+ },
+ },
+ },
}
diff --git a/lsp/julials.lua b/lsp/julials.lua
index a181bfb3..053452c8 100644
--- a/lsp/julials.lua
+++ b/lsp/julials.lua
@@ -20,12 +20,17 @@
--- julia --project=/path/to/my/project -e 'using Pkg; Pkg.instantiate()'
--- ```
---
+--- To activate a Julia environment, use the `:LspJuliaActivateEnv` command. A prompt will ask you to select a Julia
+--- environment from the list of environments found in the current working directory and the `environments/` folder of
+--- `$JULIA_DEPOT_PATH` entries. You can also provide a path to a Julia environment directly.
+--- Example: `:LspJuliaActivateEnv /path/to/my/project`.
+---
--- Note: The julia programming language searches for global environments within the `environments/`
--- folder of `$JULIA_DEPOT_PATH` entries. By default this simply `~/.julia/environments`
local root_files = { 'Project.toml', 'JuliaProject.toml' }
-local function activate_env(path)
+local function activate_env(args)
assert(vim.fn.has 'nvim-0.10' == 1, 'requires Nvim 0.10 or newer')
local bufnr = vim.api.nvim_get_current_buf()
local julials_clients = vim.lsp.get_clients { bufnr = bufnr, name = 'julials' }
@@ -42,7 +47,8 @@ local function activate_env(path)
vim.notify('Julia environment activated: \n`' .. environment .. '`', vim.log.levels.INFO)
end
end
- if path then
+ local path = args.args
+ if path ~= nil and #path > 0 then
path = vim.fs.normalize(vim.fn.fnamemodify(vim.fn.expand(path), ':p'))
local found_env = false
for _, project_file in ipairs(root_files) do
diff --git a/lsp/kakehashi.lua b/lsp/kakehashi.lua
new file mode 100644
index 00000000..b37ff7b6
--- /dev/null
+++ b/lsp/kakehashi.lua
@@ -0,0 +1,41 @@
+--- @brief
+---
+--- https://github.com/atusy/kakehashi
+---
+--- Tree-sitter-based language server that provides semantic tokens, selection ranges,
+--- and LSP bridging for embedded languages (e.g., code blocks in Markdown).
+---
+--- kakehashi works with any language that has a Tree-sitter grammar.
+--- Parsers and queries are automatically installed on first use
+--- when `autoInstall` is enabled (the default). This requires the
+--- `tree-sitter` CLI, a C compiler, and Git.
+---
+--- **You must specify `filetypes` in your call to `vim.lsp.config`** to
+--- restrict which files activate the server:
+---
+--- ```lua
+--- vim.lsp.config('kakehashi', {
+--- filetypes = { 'markdown', 'lua', 'rust', 'python' },
+--- init_options = {
+--- autoInstall = true,
+--- -- Optional: bridge LSP requests in injection regions
+--- languageServers = {
+--- ['lua_ls'] = {
+--- cmd = { 'lua-language-server' },
+--- languages = { 'lua' },
+--- },
+--- },
+--- languages = {
+--- markdown = {
+--- bridge = { lua_ls = { enabled = true } },
+--- },
+--- },
+--- },
+--- })
+--- ```
+
+---@type vim.lsp.Config
+return {
+ cmd = { 'kakehashi' },
+ root_markers = { 'kakehashi.toml', '.git' },
+}
diff --git a/lsp/lua_ls.lua b/lsp/lua_ls.lua
index 97bb6f5e..01038446 100644
--- a/lsp/lua_ls.lua
+++ b/lsp/lua_ls.lua
@@ -41,25 +41,23 @@
--- workspace = {
--- checkThirdParty = false,
--- library = {
---- vim.env.VIMRUNTIME
+--- vim.env.VIMRUNTIME,
--- -- Depending on the usage, you might want to add additional paths
--- -- here.
---- -- '${3rd}/luv/library'
---- -- '${3rd}/busted/library'
---- }
+--- -- '${3rd}/luv/library',
+--- -- '${3rd}/busted/library',
+--- },
--- -- Or pull in all of 'runtimepath'.
--- -- NOTE: this is a lot slower and will cause issues when working on
--- -- your own configuration.
--- -- See https://github.com/neovim/nvim-lspconfig/issues/3189
---- -- library = {
---- -- vim.api.nvim_get_runtime_file('', true),
---- -- }
---- }
+--- -- library = vim.api.nvim_get_runtime_file('', true),
+--- },
--- })
--- end,
--- settings = {
---- Lua = {}
---- }
+--- Lua = {},
+--- },
--- })
--- ```
---
@@ -68,21 +66,25 @@
--- * [Lua.workspace.library](https://luals.github.io/wiki/settings/#workspacelibrary)
---
+local root_markers1 = {
+ '.emmyrc.json',
+ '.luarc.json',
+ '.luarc.jsonc',
+}
+local root_markers2 = {
+ '.luacheckrc',
+ '.stylua.toml',
+ 'stylua.toml',
+ 'selene.toml',
+ 'selene.yml',
+}
+
---@type vim.lsp.Config
return {
cmd = { 'lua-language-server' },
filetypes = { 'lua' },
- root_markers = {
- '.emmyrc.json',
- '.luarc.json',
- '.luarc.jsonc',
- '.luacheckrc',
- '.stylua.toml',
- 'stylua.toml',
- 'selene.toml',
- 'selene.yml',
- '.git',
- },
+ root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers1, root_markers2, { '.git' } }
+ or vim.list_extend(vim.list_extend(root_markers1, root_markers2), { '.git' }),
settings = {
Lua = {
codeLens = { enable = true },
diff --git a/lsp/neocmake.lua b/lsp/neocmake.lua
index 34f8dac2..47699554 100644
--- a/lsp/neocmake.lua
+++ b/lsp/neocmake.lua
@@ -20,5 +20,5 @@
return {
cmd = { 'neocmakelsp', 'stdio' },
filetypes = { 'cmake' },
- root_markers = { '.git', 'build', 'cmake' },
+ root_markers = { '.neocmake.toml', '.git', 'build', 'cmake' },
}
diff --git a/lsp/oso.lua b/lsp/oso.lua
new file mode 100644
index 00000000..390dbd8c
--- /dev/null
+++ b/lsp/oso.lua
@@ -0,0 +1,32 @@
+---@brief
+--- https://www.osohq.com/docs/develop/local-dev/env-setup
+---
+--- Oso Polar language server.
+---
+--- `oso-cloud` can be installed by following the instructions
+--- [here](https://www.osohq.com/docs/develop/local-dev/env-setup).
+---
+--- The default `cmd` assumes that the `oso-cloud` binary can be found in the `$PATH`.
+---
+--- You may need to configure the filetype for Polar (*.polar) files:
+---
+--- ```
+--- autocmd BufNewFile,BufRead *.polar set filetype=polar
+--- ```
+---
+--- or
+---
+--- ```lua
+--- vim.filetype.add({
+--- pattern = {
+--- ['.*/*.polar'] = 'polar',
+--- },
+--- })
+---
+--- Alternatively, you may use a syntax plugin like https://github.com/osohq/polar.vim
+
+---@type vim.lsp.Config
+return {
+ cmd = { 'oso-cloud', 'lsp' },
+ filetypes = { 'polar' },
+}
diff --git a/lsp/oxfmt.lua b/lsp/oxfmt.lua
new file mode 100644
index 00000000..9e560b36
--- /dev/null
+++ b/lsp/oxfmt.lua
@@ -0,0 +1,55 @@
+--- @brief
+---
+--- https://github.com/oxc-project/oxc
+--- https://oxc.rs/docs/guide/usage/formatter.html
+---
+--- `oxfmt` is a Prettier-compatible code formatter that supports multiple languages
+--- including JavaScript, TypeScript, JSON, YAML, HTML, CSS, Markdown, and more.
+--- It can be installed via `npm`:
+---
+--- ```sh
+--- npm i -g oxfmt
+--- ```
+
+local util = require 'lspconfig.util'
+
+---@type vim.lsp.Config
+return {
+ cmd = function(dispatchers, config)
+ local cmd = 'oxfmt'
+ local local_cmd = (config or {}).root_dir and config.root_dir .. '/node_modules/.bin/oxfmt'
+ if local_cmd and vim.fn.executable(local_cmd) == 1 then
+ cmd = local_cmd
+ end
+ return vim.lsp.rpc.start({ cmd, '--lsp' }, dispatchers)
+ end,
+ filetypes = {
+ 'javascript',
+ 'javascriptreact',
+ 'typescript',
+ 'typescriptreact',
+ 'toml',
+ 'json',
+ 'jsonc',
+ 'json5',
+ 'yaml',
+ 'html',
+ 'vue',
+ 'handlebars',
+ 'css',
+ 'scss',
+ 'less',
+ 'graphql',
+ 'markdown',
+ },
+ workspace_required = true,
+ root_dir = function(bufnr, on_dir)
+ local fname = vim.api.nvim_buf_get_name(bufnr)
+
+ -- Oxfmt resolves configuration by walking upward and using the nearest config file
+ -- to the file being processed. We therefore compute the root directory by locating
+ -- the closest `.oxfmtrc.json` / `.oxfmtrc.jsonc` (or `package.json` fallback) above the buffer.
+ local root_markers = util.insert_package_json({ '.oxfmtrc.json', '.oxfmtrc.jsonc' }, 'oxfmt', fname)
+ on_dir(vim.fs.dirname(vim.fs.find(root_markers, { path = fname, upward = true })[1]))
+ end,
+}
diff --git a/lsp/oxlint.lua b/lsp/oxlint.lua
index 4585a985..1823aee8 100644
--- a/lsp/oxlint.lua
+++ b/lsp/oxlint.lua
@@ -1,31 +1,85 @@
--- @brief
---
--- https://github.com/oxc-project/oxc
+--- https://oxc.rs/docs/guide/usage/linter.html
---
---- `oxc` is a linter / formatter for JavaScript / Typescript supporting over 500 rules from ESLint and its popular plugins
+--- `oxlint` is a linter for JavaScript / TypeScript supporting over 500 rules from ESLint and its popular plugins.
+--- It also supports linting framework files (Vue, Svelte, Astro) by analyzing their <script> blocks.
--- It can be installed via `npm`:
---
--- ```sh
--- npm i -g oxlint
--- ```
+---
+--- Type-aware linting will automatically be enabled if `tsgolint` exists in your
+--- path and your `.oxlintrc.json` contains the string "typescript".
+---
+--- The default `on_attach` function provides an `:LspOxlintFixAll` command which
+--- can be used to fix all fixable diagnostics. See the `eslint` config entry for
+--- an example of how to use this to automatically fix all errors on write.
-local util = require 'lspconfig.util'
+local function oxlint_conf_mentions_typescript(root_dir)
+ local fn = vim.fs.joinpath(root_dir, '.oxlintrc.json')
+ for line in io.lines(fn) do
+ if line:find('typescript') then
+ return true
+ end
+ end
+ return false
+end
---@type vim.lsp.Config
return {
- cmd = { 'oxc_language_server' },
+ cmd = function(dispatchers, config)
+ local cmd = 'oxlint'
+ local local_cmd = (config or {}).root_dir and config.root_dir .. '/node_modules/.bin/oxlint'
+ if local_cmd and vim.fn.executable(local_cmd) == 1 then
+ cmd = local_cmd
+ end
+ return vim.lsp.rpc.start({ cmd, '--lsp' }, dispatchers)
+ end,
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
+ 'vue',
+ 'svelte',
+ 'astro',
},
+ root_markers = { '.oxlintrc.json', 'oxlint.config.ts' },
workspace_required = true,
- root_dir = function(bufnr, on_dir)
- local fname = vim.api.nvim_buf_get_name(bufnr)
- local root_markers = util.insert_package_json({ '.oxlintrc.json' }, 'oxlint', fname)
- on_dir(vim.fs.dirname(vim.fs.find(root_markers, { path = fname, upward = true })[1]))
+ on_attach = function(client, bufnr)
+ vim.api.nvim_buf_create_user_command(bufnr, 'LspOxlintFixAll', function()
+ client:exec_cmd({
+ title = 'Apply Oxlint automatic fixes',
+ command = 'oxc.fixAll',
+ arguments = { { uri = vim.uri_from_bufnr(bufnr) } },
+ })
+ end, {
+ desc = 'Apply Oxlint automatic fixes',
+ })
+ end,
+ settings = {
+ -- run = 'onType',
+ -- configPath = nil,
+ -- tsConfigPath = nil,
+ -- unusedDisableDirectives = 'allow',
+ -- typeAware = false,
+ -- disableNestedConfig = false,
+ -- fixKind = 'safe_fix',
+ },
+ before_init = function(init_params, config)
+ local settings = config.settings or {}
+ if settings.typeAware == nil and vim.fn.executable('tsgolint') == 1 then
+ local ok, res = pcall(oxlint_conf_mentions_typescript, config.root_dir)
+ if ok and res then
+ settings = vim.tbl_extend('force', settings, { typeAware = true })
+ end
+ end
+ local init_options = config.init_options or {}
+ init_options.settings = vim.tbl_extend('force', init_options.settings or {} --[[@as table]], settings)
+
+ init_params.initializationOptions = init_options
end,
}
diff --git a/lsp/pony_language_server.lua b/lsp/pony_language_server.lua
index 88a55e9d..78ccb3bc 100644
--- a/lsp/pony_language_server.lua
+++ b/lsp/pony_language_server.lua
@@ -1,12 +1,13 @@
---@brief
---
---- https://github.com/ponylang/pony-language-server
----
---- Language server for the Pony programming language
+--- Renamed to [pony_lsp](#pony_lsp)
---@type vim.lsp.Config
-return {
- cmd = { 'pony-lsp' },
- filetypes = { 'pony' },
- root_markers = { 'corral.json', '.git' },
-}
+return vim.tbl_extend('force', vim.lsp.config.pony_lsp, {
+ on_init = function(...)
+ vim.deprecate('pony_language_server', 'pony_lsp', '3.0.0', 'nvim-lspconfig', false)
+ if vim.lsp.config.pony_lsp.on_init then
+ vim.lsp.config.pony_lsp.on_init(...)
+ end
+ end,
+})
diff --git a/lsp/pony_lsp.lua b/lsp/pony_lsp.lua
new file mode 100644
index 00000000..62727ba9
--- /dev/null
+++ b/lsp/pony_lsp.lua
@@ -0,0 +1,24 @@
+---@brief
+---
+--- https://github.com/ponylang/ponyc/tree/main/tools/pony-lsp
+---
+--- Language server for the Pony programming language
+
+--- default settings for pony-lsp
+local function default_settings()
+ ---@type table{ defines: string[], ponypath: string[] }
+ return {
+ defines = {},
+ ponypath = {},
+ }
+end
+
+---@type vim.lsp.Config
+return {
+ cmd = { 'pony-lsp' },
+ filetypes = { 'pony' },
+ root_markers = { 'corral.json', '.git' },
+ settings = {
+ ['pony-lsp'] = default_settings(),
+ },
+}
diff --git a/lsp/pyrefly.lua b/lsp/pyrefly.lua
index e4758d1a..db9c3358 100644
--- a/lsp/pyrefly.lua
+++ b/lsp/pyrefly.lua
@@ -21,6 +21,8 @@ return {
'.git',
},
on_exit = function(code, _, _)
- vim.notify('Closing Pyrefly LSP exited with code: ' .. code, vim.log.levels.INFO)
+ vim.schedule(function()
+ vim.notify('Closing Pyrefly LSP exited with code: ' .. code, vim.log.levels.INFO)
+ end)
end,
}
diff --git a/lsp/rome.lua b/lsp/rome.lua
index d6c787ea..56bb5ad4 100644
--- a/lsp/rome.lua
+++ b/lsp/rome.lua
@@ -18,7 +18,6 @@ return {
'javascriptreact',
'json',
'typescript',
- 'typescript.tsx',
'typescriptreact',
},
root_markers = { 'package.json', 'node_modules', '.git' },
diff --git a/lsp/roslyn_ls.lua b/lsp/roslyn_ls.lua
index 6bc9cad1..3f584ae2 100644
--- a/lsp/roslyn_ls.lua
+++ b/lsp/roslyn_ls.lua
@@ -98,12 +98,23 @@ local function roslyn_handlers()
}
end
+---@param bufname string
+---@return boolean
+local function is_decompiled(bufname)
+ local _, endpos = bufname:find('[/\\]MetadataAsSource[/\\]')
+ if endpos == nil then
+ return false
+ end
+ return vim.fn.finddir(bufname:sub(1, endpos), uv.os_tmpdir()) ~= ''
+end
+
---@type vim.lsp.Config
return {
name = 'roslyn_ls',
offset_encoding = 'utf-8',
cmd = {
- 'Microsoft.CodeAnalysis.LanguageServer',
+ vim.fn.executable('Microsoft.CodeAnalysis.LanguageServer') == 1 and 'Microsoft.CodeAnalysis.LanguageServer'
+ or 'roslyn-language-server',
'--logLevel',
'Information',
'--extensionLogDirectory',
@@ -143,7 +154,7 @@ return {
local bufname = vim.api.nvim_buf_get_name(bufnr)
-- don't try to find sln or csproj for files from libraries
-- outside of the project
- if not bufname:match('^' .. fs.joinpath('/tmp/MetadataAsSource/')) then
+ if not is_decompiled(bufname) then
-- try find solutions root first
local root_dir = fs.root(bufnr, function(fname, _)
return fname:match('%.sln[x]?$') ~= nil
diff --git a/lsp/ruby_lsp.lua b/lsp/ruby_lsp.lua
index 87e2f598..23be43e0 100644
--- a/lsp/ruby_lsp.lua
+++ b/lsp/ruby_lsp.lua
@@ -14,7 +14,13 @@
---@type vim.lsp.Config
return {
- cmd = { 'ruby-lsp' },
+ cmd = function(dispatchers, config)
+ return vim.lsp.rpc.start(
+ { 'ruby-lsp' },
+ dispatchers,
+ config and config.root_dir and { cwd = config.cmd_cwd or config.root_dir }
+ )
+ end,
filetypes = { 'ruby', 'eruby' },
root_markers = { 'Gemfile', '.git' },
init_options = {
diff --git a/lsp/rust_analyzer.lua b/lsp/rust_analyzer.lua
index c5eed517..89e31171 100644
--- a/lsp/rust_analyzer.lua
+++ b/lsp/rust_analyzer.lua
@@ -35,6 +35,33 @@ local function reload_workspace(bufnr)
end
end
+local function user_sysroot_src()
+ return vim.tbl_get(vim.lsp.config['rust_analyzer'], 'settings', 'rust-analyzer', 'cargo', 'sysrootSrc')
+end
+
+local function default_sysroot_src()
+ local sysroot = vim.tbl_get(vim.lsp.config['rust_analyzer'], 'settings', 'rust-analyzer', 'cargo', 'sysroot')
+ if not sysroot then
+ local rustc = os.getenv 'RUSTC' or 'rustc'
+ local result = vim.system({ rustc, '--print', 'sysroot' }, { text = true }):wait()
+
+ local stdout = result.stdout
+ if result.code == 0 and stdout then
+ if string.sub(stdout, #stdout) == '\n' then
+ if #stdout > 1 then
+ sysroot = string.sub(stdout, 1, #stdout - 1)
+ else
+ sysroot = ''
+ end
+ else
+ sysroot = stdout
+ end
+ end
+ end
+
+ return sysroot and vim.fs.joinpath(sysroot, 'lib/rustlib/src/rust/library') or nil
+end
+
local function is_library(fname)
local user_home = vim.fs.normalize(vim.env.HOME)
local cargo_home = os.getenv 'CARGO_HOME' or user_home .. '/.cargo'
@@ -44,8 +71,10 @@ local function is_library(fname)
local rustup_home = os.getenv 'RUSTUP_HOME' or user_home .. '/.rustup'
local toolchains = rustup_home .. '/toolchains'
- for _, item in ipairs { toolchains, registry, git_registry } do
- if vim.fs.relpath(item, fname) then
+ local sysroot_src = user_sysroot_src() or default_sysroot_src()
+
+ for _, item in ipairs { toolchains, registry, git_registry, sysroot_src } do
+ if item and vim.fs.relpath(item, fname) then
local clients = vim.lsp.get_clients { name = 'rust_analyzer' }
return #clients > 0 and clients[#clients].config.root_dir or nil
end
@@ -144,7 +173,7 @@ return {
vim.list_extend(cmd, { '--', unpack(r.args.executableArgs) })
end
- local proc = vim.system(cmd, { cwd = r.args.cwd })
+ local proc = vim.system(cmd, { cwd = r.args.cwd, env = r.args.environment })
local result = proc:wait()
diff --git a/lsp/slangd.lua b/lsp/slangd.lua
index 3208e3cc..a12cac9e 100644
--- a/lsp/slangd.lua
+++ b/lsp/slangd.lua
@@ -27,5 +27,5 @@
return {
cmd = { 'slangd' },
filetypes = { 'hlsl', 'shaderslang' },
- root_markers = { '.git' },
+ root_markers = { 'slangdconfig.json', '.clang-format', '.git' },
}
diff --git a/lsp/snyk_ls.lua b/lsp/snyk_ls.lua
index 32d0183d..75a121c6 100644
--- a/lsp/snyk_ls.lua
+++ b/lsp/snyk_ls.lua
@@ -2,28 +2,98 @@
---
--- https://github.com/snyk/snyk-ls
---
---- LSP for Snyk Open Source, Snyk Infrastructure as Code, and Snyk Code.
+--- **[Snyk](https://snyk.io)** is a developer security platform that helps you find and fix
+--- vulnerabilities in your code, open source dependencies, containers, and infrastructure as code.
+---
+--- The Snyk Language Server provides real-time security scanning for:
+--- - **Snyk Open Source**: Find and fix vulnerabilities in open source dependencies
+--- - **Snyk Code**: Find and fix security vulnerabilities in your code
+--- - **Snyk Infrastructure as Code**: Find and fix security issues in Kubernetes, Terraform, and other IaC files
+---
+--- ## Authentication
+---
+--- **Note**: Currently, only token-based authentication is supported in Neovim.
+---
+--- 1. Get your API token from https://app.snyk.io/account
+--- 2. Set the `SNYK_TOKEN` environment variable:
+--- ```sh
+--- export SNYK_TOKEN="your-token-here"
+--- ```
+---
+--- ## Trusted Folders
+---
+--- Snyk requires you to trust directories before scanning them. To avoid being prompted every time:
+---
+--- ```lua
+--- vim.lsp.config('snyk_ls', {
+--- init_options = {
+--- trustedFolders = {
+--- '/Users/yourname/projects', -- Trust your projects directory
+--- '/path/to/another/trusted/dir',
+--- },
+--- },
+--- })
+--- ```
+---
+--- **Important**: Trust the top-level directory where you store your repositories, not individual repos.
+--- For example, if you work on `/Users/yourname/projects/my-app`, trust `/Users/yourname/projects`.
+--- Only trust directories containing code you trust to scan.
+---
+--- ## Configuration
+---
+--- Full configuration options available at https://github.com/snyk/snyk-ls#configuration-1
+---
+--- ### Advanced Configuration
+---
+--- For **non-default multi-tenant or single-tenant setups**, you may need to specify:
+---
+--- - `endpoint`: Custom Snyk API endpoint (e.g., `https://api.eu.snyk.io` for EU, or your single-tenant URL)
+--- ```
---@type vim.lsp.Config
return {
- cmd = { 'snyk-ls' },
+ cmd = { 'snyk', 'language-server', '-l', 'info' },
root_markers = { '.git', '.snyk' },
filetypes = {
+ 'apex',
+ 'apexcode',
+ 'c',
+ 'cpp',
+ 'cs',
+ 'dart',
+ 'dockerfile',
+ 'elixir',
+ 'eelixir',
'go',
'gomod',
+ 'groovy',
+ 'helm',
+ 'java',
'javascript',
- 'typescript',
'json',
+ 'kotlin',
+ 'objc',
+ 'objcpp',
+ 'php',
'python',
'requirements',
- 'helm',
- 'yaml',
+ 'ruby',
+ 'rust',
+ 'scala',
+ 'swift',
'terraform',
'terraform-vars',
+ 'typescript',
+ 'yaml',
},
settings = {},
- -- Configuration from https://github.com/snyk/snyk-ls#configuration-1
init_options = {
- activateSnykCode = 'true',
+ activateSnykOpenSource = 'true', -- Scan open source dependencies
+ activateSnykCode = 'false', -- Scan your code for vulnerabilities
+ activateSnykIac = 'true', -- Scan infrastructure as code
+ integrationName = 'Neovim',
+ integrationVersion = tostring(vim.version()),
+ token = os.getenv('SNYK_TOKEN') or vim.NIL,
+ trustedFolders = {}, -- Add your trusted directories here to avoid being prompted every time
},
}
diff --git a/lsp/systemd_ls.lua b/lsp/systemd_ls.lua
index 7d9f975e..e0478e28 100644
--- a/lsp/systemd_ls.lua
+++ b/lsp/systemd_ls.lua
@@ -2,7 +2,12 @@
---
--- Renamed to [systemd_lsp](#systemd_lsp)
-vim.deprecate('systemd_ls', 'systemd_lsp', '2.0.0', 'nvim-lspconfig', false)
-
---@type vim.lsp.Config
-return vim.lsp.config.systemd_ls
+return vim.tbl_extend('force', vim.lsp.config.systemd_lsp, {
+ on_init = function(...)
+ vim.deprecate('systemd_ls', 'systemd_lsp', '3.0.0', 'nvim-lspconfig', false)
+ if vim.lsp.config.systemd_lsp.on_init then
+ vim.lsp.config.systemd_lsp.on_init(...)
+ end
+ end,
+})
diff --git a/lsp/ts_ls.lua b/lsp/ts_ls.lua
index 23ac144e..84534618 100644
--- a/lsp/ts_ls.lua
+++ b/lsp/ts_ls.lua
@@ -42,6 +42,36 @@
---
--- It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
---
+--- Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+--- expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
+--- mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
+--- or deno.jsonc.
+---
+--- Example:
+---
+--- ```
+--- project-root
+--- +-- node_modules/...
+--- +-- package-lock.json
+--- +-- package.json
+--- +-- packages
+--- +-- deno-module
+--- | +-- deno.json
+--- | +-- package.json <-- It's normal for Deno projects to have package.json files!
+--- | +-- src
+--- | +-- index.ts <-- this is a Deno file
+--- +-- node-module
+--- +-- package.json
+--- +-- src
+--- +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
+--- ```
+---
+--- From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+--- From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+--- From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+--- If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
+--- If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
+--- Otherwise, attach at PROJECT ROOT, or the cwd if not found.
---@type vim.lsp.Config
return {
@@ -50,10 +80,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = function(bufnr, on_dir)
-- The project root is where the LSP can be started from
@@ -65,11 +93,18 @@ return {
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
or vim.list_extend(root_markers, { '.git' })
-- exclude deno
- local deno_path = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc', 'deno.lock' })
+ local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' })
+ local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' })
local project_root = vim.fs.root(bufnr, root_markers)
- if deno_path and (not project_root or #deno_path >= #project_root) then
+ if deno_lock_root and (not project_root or #deno_lock_root > #project_root) then
+ -- deno lock is closer than package manager lock, abort
+ return
+ end
+ if deno_root and (not project_root or #deno_root >= #project_root) then
+ -- deno config is closer than or equal to package manager lock, abort
return
end
+ -- project is standard TS, not deno
-- We fallback to the current working directory if no project root is found
on_dir(project_root or vim.fn.getcwd())
end,
diff --git a/lsp/tsgo.lua b/lsp/tsgo.lua
index e51971dc..d27a61c2 100644
--- a/lsp/tsgo.lua
+++ b/lsp/tsgo.lua
@@ -13,6 +13,36 @@
---
--- It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
---
+--- Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
+--- expects to run in Node or Web Browsers. This supports having a Deno module using the denols LSP as a part of a
+--- mostly-not-Deno monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json
+--- or deno.jsonc.
+---
+--- Example:
+---
+--- ```
+--- project-root
+--- +-- node_modules/...
+--- +-- package-lock.json
+--- +-- package.json
+--- +-- packages
+--- +-- deno-module
+--- | +-- deno.json
+--- | +-- package.json <-- It's normal for Deno projects to have package.json files!
+--- | +-- src
+--- | +-- index.ts <-- this is a Deno file
+--- +-- node-module
+--- +-- package.json
+--- +-- src
+--- +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgols)
+--- ```
+---
+--- From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
+--- From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
+--- From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
+--- If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we abort.
+--- If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we abort.
+--- Otherwise, attach at PROJECT ROOT, or the cwd if not found.
---@type vim.lsp.Config
return {
@@ -27,10 +57,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = function(bufnr, on_dir)
-- The project root is where the LSP can be started from
@@ -42,14 +70,19 @@ return {
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
or vim.list_extend(root_markers, { '.git' })
- -- exclude deno
- if vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc', 'deno.lock' }) then
+ local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' })
+ local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' })
+ local project_root = vim.fs.root(bufnr, root_markers)
+ if deno_lock_root and (not project_root or #deno_lock_root > #project_root) then
+ -- deno lock is closer than package manager lock, abort
return
end
-
+ if deno_root and (not project_root or #deno_root >= #project_root) then
+ -- deno config is closer than or equal to package manager lock, abort
+ return
+ end
+ -- project is standard TS, not deno
-- We fallback to the current working directory if no project root is found
- local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
-
- on_dir(project_root)
+ on_dir(project_root or vim.fn.getcwd())
end,
}
diff --git a/lsp/vala_ls.lua b/lsp/vala_ls.lua
index f67034ee..04e5fb97 100644
--- a/lsp/vala_ls.lua
+++ b/lsp/vala_ls.lua
@@ -1,6 +1,6 @@
---@brief
---
---- https://github.com/Prince781/vala-language-server
+--- https://github.com/vala-lang/vala-language-server
local meson_matcher = function(path)
local pattern = 'meson.build'
diff --git a/lsp/volar.lua b/lsp/volar.lua
index 040a93eb..f797541c 100644
--- a/lsp/volar.lua
+++ b/lsp/volar.lua
@@ -1,9 +1,13 @@
---@brief
---
--- Renamed to [vue_ls](#vue_ls)
----
----
-vim.deprecate('volar', 'vue_ls', '3.0.0', 'nvim-lspconfig', false)
---@type vim.lsp.Config
-return vim.lsp.config.vue_ls
+return vim.tbl_extend('force', vim.lsp.config.vue_ls, {
+ on_init = function(...)
+ vim.deprecate('volar', 'vue_ls', '3.0.0', 'nvim-lspconfig', false)
+ if vim.lsp.config.vue_ls.on_init then
+ vim.lsp.config.vue_ls.on_init(...)
+ end
+ end,
+})
diff --git a/lsp/vscoqtop.lua b/lsp/vscoqtop.lua
index 78186c51..897113b4 100644
--- a/lsp/vscoqtop.lua
+++ b/lsp/vscoqtop.lua
@@ -2,7 +2,12 @@
---
--- Renamed to [vsrocq](#vsrocq)
-vim.deprecate('vscoqtop', 'vsrocq', '2.0.0', 'nvim-lspconfig', false)
-
---@type vim.lsp.Config
-return vim.lsp.config.vsrocq
+return vim.tbl_extend('force', vim.lsp.config.vsrocq, {
+ on_init = function(...)
+ vim.deprecate('vscoqtop', 'vsrocq', '3.0.0', 'nvim-lspconfig', false)
+ if vim.lsp.config.vsrocq.on_init then
+ vim.lsp.config.vsrocq.on_init(...)
+ end
+ end,
+})
diff --git a/lsp/vtsls.lua b/lsp/vtsls.lua
index 29466f5e..04f270bf 100644
--- a/lsp/vtsls.lua
+++ b/lsp/vtsls.lua
@@ -64,6 +64,8 @@
--- This works without the need of spawning multiple instances of `vtsls`, saving memory.
---
--- It is recommended to use the same version of TypeScript in all packages, and therefore have it available in your workspace root. The location of the TypeScript binary will be determined automatically, but only once.
+---
+--- This includes the same Deno-excluding logic from `ts_ls`. It is not recommended to enable both `vtsls` and `ts_ls` at the same time!
---@type vim.lsp.Config
return {
@@ -74,10 +76,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = function(bufnr, on_dir)
-- The project root is where the LSP can be started from
@@ -88,15 +88,20 @@ return {
-- Give the root markers equal priority by wrapping them in a table
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
or vim.list_extend(root_markers, { '.git' })
-
-- exclude deno
- if vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc', 'deno.lock' }) then
+ local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' })
+ local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' })
+ local project_root = vim.fs.root(bufnr, root_markers)
+ if deno_lock_root and (not project_root or #deno_lock_root > #project_root) then
+ -- deno lock is closer than package manager lock, abort
return
end
-
+ if deno_root and (not project_root or #deno_root >= #project_root) then
+ -- deno config is closer than or equal to package manager lock, abort
+ return
+ end
+ -- project is standard TS, not deno
-- We fallback to the current working directory if no project root is found
- local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
-
- on_dir(project_root)
+ on_dir(project_root or vim.fn.getcwd())
end,
}
diff --git a/lua/lspconfig/configs/angularls.lua b/lua/lspconfig/configs/angularls.lua
index 0b5350a9..cd0b8274 100644
--- a/lua/lspconfig/configs/angularls.lua
+++ b/lua/lspconfig/configs/angularls.lua
@@ -56,7 +56,7 @@ return {
'--angularCoreVersion',
default_angular_core_version,
},
- filetypes = { 'typescript', 'html', 'typescriptreact', 'typescript.tsx', 'htmlangular' },
+ filetypes = { 'typescript', 'html', 'typescriptreact', 'htmlangular' },
-- Check for angular.json since that is the root of the project.
-- Don't check for tsconfig.json or package.json since there are multiple of these
-- in an angular monorepo setup.
diff --git a/lua/lspconfig/configs/biome.lua b/lua/lspconfig/configs/biome.lua
index 9a65f020..99dedc35 100644
--- a/lua/lspconfig/configs/biome.lua
+++ b/lua/lspconfig/configs/biome.lua
@@ -20,7 +20,6 @@ return {
'jsonc',
'svelte',
'typescript',
- 'typescript.tsx',
'typescriptreact',
'vue',
},
diff --git a/lua/lspconfig/configs/denols.lua b/lua/lspconfig/configs/denols.lua
index cd0bf118..f503a14f 100644
--- a/lua/lspconfig/configs/denols.lua
+++ b/lua/lspconfig/configs/denols.lua
@@ -76,10 +76,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = util.root_pattern('deno.json', 'deno.jsonc', '.git'),
settings = {
diff --git a/lua/lspconfig/configs/eslint.lua b/lua/lspconfig/configs/eslint.lua
index 08133096..83b543b9 100644
--- a/lua/lspconfig/configs/eslint.lua
+++ b/lua/lspconfig/configs/eslint.lua
@@ -60,10 +60,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
'vue',
'svelte',
'astro',
diff --git a/lua/lspconfig/configs/flow.lua b/lua/lspconfig/configs/flow.lua
index 34d89451..c3c203f8 100644
--- a/lua/lspconfig/configs/flow.lua
+++ b/lua/lspconfig/configs/flow.lua
@@ -10,7 +10,7 @@ local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'npx', '--no-install', 'flow', 'lsp' },
- filetypes = { 'javascript', 'javascriptreact', 'javascript.jsx' },
+ filetypes = { 'javascript', 'javascriptreact' },
root_dir = util.root_pattern '.flowconfig',
},
docs = {
diff --git a/lua/lspconfig/configs/golangci_lint_ls.lua b/lua/lspconfig/configs/golangci_lint_ls.lua
index 5e822206..109933d4 100644
--- a/lua/lspconfig/configs/golangci_lint_ls.lua
+++ b/lua/lspconfig/configs/golangci_lint_ls.lua
@@ -12,7 +12,22 @@ return {
cmd = { 'golangci-lint-langserver' },
filetypes = { 'go', 'gomod' },
init_options = {
- command = { 'golangci-lint', 'run', '--output.json.path=stdout', '--show-stats=false' },
+ command = {
+ 'golangci-lint',
+ 'run',
+ -- disable all output formats that might be enabled by the users .golangci.yml
+ '--output.text.path=',
+ '--output.tab.path=',
+ '--output.html.path=',
+ '--output.checkstyle.path=',
+ '--output.junit-xml.path=',
+ '--output.teamcity.path=',
+ '--output.sarif.path=',
+ -- disable stats output
+ '--show-stats=false',
+ -- enable JSON output to be used by the language server
+ '--output.json.path=stdout',
+ },
},
root_dir = function(fname)
return util.root_pattern(
diff --git a/lua/lspconfig/configs/oxlint.lua b/lua/lspconfig/configs/oxlint.lua
index 6246d72c..37e38025 100644
--- a/lua/lspconfig/configs/oxlint.lua
+++ b/lua/lspconfig/configs/oxlint.lua
@@ -16,7 +16,6 @@ return {
'javascriptreact',
'svelte',
'typescript',
- 'typescript.tsx',
'typescriptreact',
'vue',
},
diff --git a/lua/lspconfig/configs/relay_lsp.lua b/lua/lspconfig/configs/relay_lsp.lua
index 02ef0e60..353907ec 100644
--- a/lua/lspconfig/configs/relay_lsp.lua
+++ b/lua/lspconfig/configs/relay_lsp.lua
@@ -23,10 +23,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = util.root_pattern('relay.config.*', 'package.json'),
on_new_config = function(config, root_dir)
diff --git a/lua/lspconfig/configs/rome.lua b/lua/lspconfig/configs/rome.lua
index a5aae528..18e5cf1d 100644
--- a/lua/lspconfig/configs/rome.lua
+++ b/lua/lspconfig/configs/rome.lua
@@ -13,7 +13,6 @@ return {
'javascriptreact',
'json',
'typescript',
- 'typescript.tsx',
'typescriptreact',
},
root_dir = function(fname)
diff --git a/lua/lspconfig/configs/ts_ls.lua b/lua/lspconfig/configs/ts_ls.lua
index 8e421a24..7b24ea81 100644
--- a/lua/lspconfig/configs/ts_ls.lua
+++ b/lua/lspconfig/configs/ts_ls.lua
@@ -14,10 +14,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = util.root_pattern('tsconfig.json', 'jsconfig.json', 'package.json', '.git'),
single_file_support = true,
diff --git a/lua/lspconfig/configs/vtsls.lua b/lua/lspconfig/configs/vtsls.lua
index f54f4935..50a4e927 100644
--- a/lua/lspconfig/configs/vtsls.lua
+++ b/lua/lspconfig/configs/vtsls.lua
@@ -13,10 +13,8 @@ return {
filetypes = {
'javascript',
'javascriptreact',
- 'javascript.jsx',
'typescript',
'typescriptreact',
- 'typescript.tsx',
},
root_dir = util.root_pattern('tsconfig.json', 'package.json', 'jsconfig.json', '.git'),
single_file_support = true,
diff --git a/scripts/docs_template.txt b/scripts/docs_template.txt
index 826f52be..328105fb 100644
--- a/scripts/docs_template.txt
+++ b/scripts/docs_template.txt
@@ -1,4 +1,4 @@
-*lspconfig-all*
+*lspconfig-all* All configurations provided by |lspconfig|
LSP configurations provided by nvim-lspconfig are listed below.