Skip to content

Commit 7d06fa5

Browse files
committed
fix: exclude deno from biome/eslint/ts_ls/tsgo/vtsls
1 parent ac98db2 commit 7d06fa5

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

lsp/biome.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ return {
4848
-- Give the root markers equal priority by wrapping them in a table
4949
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
5050
or vim.list_extend(root_markers, { '.git' })
51+
52+
-- exclude deno
53+
if vim.fs.root(bufnr, { 'deno.json', 'deno.lock' }) then
54+
return
55+
end
56+
5157
-- We fallback to the current working directory if no project root is found
5258
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
5359

lsp/eslint.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ return {
9595
-- Give the root markers equal priority by wrapping them in a table
9696
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
9797
or vim.list_extend(root_markers, { '.git' })
98+
99+
-- exclude deno
100+
if vim.fs.root(bufnr, { 'deno.json', 'deno.lock' }) then
101+
return
102+
end
103+
98104
-- We fallback to the current working directory if no project root is found
99105
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
100106

lsp/ts_ls.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ return {
6262
-- Give the root markers equal priority by wrapping them in a table
6363
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
6464
or vim.list_extend(root_markers, { '.git' })
65+
66+
-- exclude deno
67+
if vim.fs.root(bufnr, { 'deno.json', 'deno.lock' }) then
68+
return
69+
end
70+
6571
-- We fallback to the current working directory if no project root is found
6672
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
6773

lsp/tsgo.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ return {
3434
-- Give the root markers equal priority by wrapping them in a table
3535
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
3636
or vim.list_extend(root_markers, { '.git' })
37+
38+
-- exclude deno
39+
if vim.fs.root(bufnr, { 'deno.json', 'deno.lock' }) then
40+
return
41+
end
42+
3743
-- We fallback to the current working directory if no project root is found
3844
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
3945

lsp/vtsls.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@ return {
8888
-- Give the root markers equal priority by wrapping them in a table
8989
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
9090
or vim.list_extend(root_markers, { '.git' })
91+
92+
-- exclude deno
93+
if vim.fs.root(bufnr, { 'deno.json', 'deno.lock' }) then
94+
return
95+
end
96+
9197
-- We fallback to the current working directory if no project root is found
9298
local project_root = vim.fs.root(bufnr, root_markers) or vim.fn.getcwd()
9399

0 commit comments

Comments
 (0)