aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorapostoli <79337131+apostolos-geyer@users.noreply.github.com>2024-12-14 19:50:47 -0500
committerGitHub <noreply@github.com>2024-12-15 08:50:47 +0800
commitae8a01bb40848490548e5d07b97ed972ed43c2f9 (patch)
tree7d5b319a7f324c990e990b9a2fe4206e382d48c7 /lua
parentrefactor!: remove util.path.is_absolute (diff)
downloadnvim-lspconfig-ae8a01bb40848490548e5d07b97ed972ed43c2f9.tar
nvim-lspconfig-ae8a01bb40848490548e5d07b97ed972ed43c2f9.tar.gz
nvim-lspconfig-ae8a01bb40848490548e5d07b97ed972ed43c2f9.tar.bz2
nvim-lspconfig-ae8a01bb40848490548e5d07b97ed972ed43c2f9.tar.lz
nvim-lspconfig-ae8a01bb40848490548e5d07b97ed972ed43c2f9.tar.xz
nvim-lspconfig-ae8a01bb40848490548e5d07b97ed972ed43c2f9.tar.zst
nvim-lspconfig-ae8a01bb40848490548e5d07b97ed972ed43c2f9.zip
fix(ruff, ruff_lsp, crystalline, janet_lsp): returning a function from root pattern (#3513)
* fix(ruff, ruff_lsp): error returning the function returned by util.root_pattern on lsp start * fix(crystalline, janet_lsp): invoke function returned by root pattern
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs/crystalline.lua3
-rw-r--r--lua/lspconfig/configs/janet_lsp.lua2
-rw-r--r--lua/lspconfig/configs/ruff.lua2
-rw-r--r--lua/lspconfig/configs/ruff_lsp.lua2
4 files changed, 5 insertions, 4 deletions
diff --git a/lua/lspconfig/configs/crystalline.lua b/lua/lspconfig/configs/crystalline.lua
index 9cf4841e..0b321f2b 100644
--- a/lua/lspconfig/configs/crystalline.lua
+++ b/lua/lspconfig/configs/crystalline.lua
@@ -5,7 +5,8 @@ return {
cmd = { 'crystalline' },
filetypes = { 'crystal' },
root_dir = function(fname)
- return util.root_pattern 'shard.yml' or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
+ return util.root_pattern('shard.yml')(fname)
+ or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
end,
single_file_support = true,
},
diff --git a/lua/lspconfig/configs/janet_lsp.lua b/lua/lspconfig/configs/janet_lsp.lua
index 5d3ca1d5..ce0908ad 100644
--- a/lua/lspconfig/configs/janet_lsp.lua
+++ b/lua/lspconfig/configs/janet_lsp.lua
@@ -8,7 +8,7 @@ return {
},
filetypes = { 'janet' },
root_dir = function(fname)
- return util.root_pattern 'project.janet'
+ return util.root_pattern('project.janet')(fname)
or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
end,
single_file_support = true,
diff --git a/lua/lspconfig/configs/ruff.lua b/lua/lspconfig/configs/ruff.lua
index dbe5718b..bec2254b 100644
--- a/lua/lspconfig/configs/ruff.lua
+++ b/lua/lspconfig/configs/ruff.lua
@@ -5,7 +5,7 @@ return {
cmd = { 'ruff', 'server' },
filetypes = { 'python' },
root_dir = function(fname)
- return util.root_pattern('pyproject.toml', 'ruff.toml', '.ruff.toml')
+ return util.root_pattern('pyproject.toml', 'ruff.toml', '.ruff.toml')(fname)
or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
end,
single_file_support = true,
diff --git a/lua/lspconfig/configs/ruff_lsp.lua b/lua/lspconfig/configs/ruff_lsp.lua
index e304a522..ea00352b 100644
--- a/lua/lspconfig/configs/ruff_lsp.lua
+++ b/lua/lspconfig/configs/ruff_lsp.lua
@@ -5,7 +5,7 @@ return {
cmd = { 'ruff-lsp' },
filetypes = { 'python' },
root_dir = function(fname)
- return util.root_pattern('pyproject.toml', 'ruff.toml')
+ return util.root_pattern('pyproject.toml', 'ruff.toml')(fname)
or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
end,
single_file_support = true,