aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/tsgo.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lsp/tsgo.lua')
-rw-r--r--lsp/tsgo.lua5
1 files changed, 3 insertions, 2 deletions
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