aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-08-21 21:31:43 -0400
committerJustin M. Keyes <justinkz@gmail.com>2025-08-21 21:31:43 -0400
commit8373a1b7a7ab7a9972b55182073be5ac2f3bec0a (patch)
tree294680c61a3a31390115a94e55eb62f71c1492dd
parentrefactor(roslyn_ls): reduce notification noise #4024 (diff)
downloadnvim-lspconfig-8373a1b7a7ab7a9972b55182073be5ac2f3bec0a.tar
nvim-lspconfig-8373a1b7a7ab7a9972b55182073be5ac2f3bec0a.tar.gz
nvim-lspconfig-8373a1b7a7ab7a9972b55182073be5ac2f3bec0a.tar.bz2
nvim-lspconfig-8373a1b7a7ab7a9972b55182073be5ac2f3bec0a.tar.lz
nvim-lspconfig-8373a1b7a7ab7a9972b55182073be5ac2f3bec0a.tar.xz
nvim-lspconfig-8373a1b7a7ab7a9972b55182073be5ac2f3bec0a.tar.zst
nvim-lspconfig-8373a1b7a7ab7a9972b55182073be5ac2f3bec0a.zip
fix(ts/js): support older Nvim 0.11.x
fix #4023
-rw-r--r--lsp/biome.lua5
-rw-r--r--lsp/eslint.lua5
-rw-r--r--lsp/ts_ls.lua5
-rw-r--r--lsp/tsgo.lua5
-rw-r--r--lsp/vtsls.lua5
5 files changed, 15 insertions, 10 deletions
diff --git a/lsp/biome.lua b/lsp/biome.lua
index b2f6cfea..90f5c74f 100644
--- a/lsp/biome.lua
+++ b/lsp/biome.lua
@@ -44,9 +44,10 @@ 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 project_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' }
-- Give the root markers equal priority by wrapping them in a table
- local project_root = vim.fs.root(bufnr, { project_root_markers })
+ root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers } or root_markers
+ local project_root = vim.fs.root(bufnr, root_markers)
if not project_root then
return
end
diff --git a/lsp/eslint.lua b/lsp/eslint.lua
index 36b9780a..eed05827 100644
--- a/lsp/eslint.lua
+++ b/lsp/eslint.lua
@@ -91,9 +91,10 @@ 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 project_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' }
-- Give the root markers equal priority by wrapping them in a table
- local project_root = vim.fs.root(bufnr, { project_root_markers })
+ root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers } or root_markers
+ local project_root = vim.fs.root(bufnr, root_markers)
if not project_root then
return
end
diff --git a/lsp/ts_ls.lua b/lsp/ts_ls.lua
index 29d36c1c..7be78087 100644
--- a/lsp/ts_ls.lua
+++ b/lsp/ts_ls.lua
@@ -58,9 +58,10 @@ 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 project_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' }
-- Give the root markers equal priority by wrapping them in a table
- local project_root = vim.fs.root(bufnr, { project_root_markers })
+ root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers } or root_markers
+ local project_root = vim.fs.root(bufnr, root_markers)
if not project_root then
return
end
diff --git a/lsp/tsgo.lua b/lsp/tsgo.lua
index d7b493e4..17cbcae8 100644
--- a/lsp/tsgo.lua
+++ b/lsp/tsgo.lua
@@ -30,9 +30,10 @@ 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 project_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' }
-- Give the root markers equal priority by wrapping them in a table
- local project_root = vim.fs.root(bufnr, { project_root_markers })
+ root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers } or root_markers
+ local project_root = vim.fs.root(bufnr, root_markers)
if not project_root then
return
end
diff --git a/lsp/vtsls.lua b/lsp/vtsls.lua
index 5c17746a..258e8eaa 100644
--- a/lsp/vtsls.lua
+++ b/lsp/vtsls.lua
@@ -81,9 +81,10 @@ 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 project_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' }
-- Give the root markers equal priority by wrapping them in a table
- local project_root = vim.fs.root(bufnr, { project_root_markers })
+ root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers } or root_markers
+ local project_root = vim.fs.root(bufnr, root_markers)
if not project_root then
return
end