aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/ast_grep.lua
diff options
context:
space:
mode:
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',