aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/ast_grep.lua
diff options
context:
space:
mode:
authorAlex Efros <powerman@powerman.name>2025-05-26 18:30:38 +0300
committerGitHub <noreply@github.com>2025-05-26 08:30:38 -0700
commit6c573c8000ec9ed57c7efb75de8fb16903909a3c (patch)
tree5e4d329f2f4d540143514e1d216a129079c0d3ef /lsp/ast_grep.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-6c573c8000ec9ed57c7efb75de8fb16903909a3c.tar
nvim-lspconfig-6c573c8000ec9ed57c7efb75de8fb16903909a3c.tar.gz
nvim-lspconfig-6c573c8000ec9ed57c7efb75de8fb16903909a3c.tar.bz2
nvim-lspconfig-6c573c8000ec9ed57c7efb75de8fb16903909a3c.tar.lz
nvim-lspconfig-6c573c8000ec9ed57c7efb75de8fb16903909a3c.tar.xz
nvim-lspconfig-6c573c8000ec9ed57c7efb75de8fb16903909a3c.tar.zst
nvim-lspconfig-6c573c8000ec9ed57c7efb75de8fb16903909a3c.zip
feat(ast_grep): support multiple workspaces #3866
Diffstat (limited to 'lsp/ast_grep.lua')
-rw-r--r--lsp/ast_grep.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lsp/ast_grep.lua b/lsp/ast_grep.lua
index 87922bdf..6ba3d7ce 100644
--- a/lsp/ast_grep.lua
+++ b/lsp/ast_grep.lua
@@ -10,6 +10,10 @@
return {
cmd = { 'ast-grep', 'lsp' },
workspace_required = true,
+ reuse_client = function(client, config)
+ config.cmd_cwd = config.root_dir
+ return client.config.cmd_cwd == config.cmd_cwd
+ end,
filetypes = { -- https://ast-grep.github.io/reference/languages.html
'c',
'cpp',