From d5f76f9d2fea7ac832f08dd7a503a2a4912c452c Mon Sep 17 00:00:00 2001 From: Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com> Date: Wed, 8 Nov 2023 17:20:11 -0800 Subject: fix: improve root_dir pattern for ast-grep (#2882) --- lua/lspconfig/server_configurations/ast_grep.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/ast_grep.lua b/lua/lspconfig/server_configurations/ast_grep.lua index eba37d6b..8892eafa 100644 --- a/lua/lspconfig/server_configurations/ast_grep.lua +++ b/lua/lspconfig/server_configurations/ast_grep.lua @@ -18,7 +18,7 @@ return { 'dart', 'lua', }, - root_dir = util.root_pattern 'sgconfig.yaml', + root_dir = util.root_pattern('sgconfig.yaml', 'sgconfig.yml'), single_file_support = true, }, docs = { @@ -26,13 +26,13 @@ return { https://ast-grep.github.io/ ast-grep(sg) is a fast and polyglot tool for code structural search, lint, rewriting at large scale. - +ast-grep LSP only works in projects that have `sgconfig.y[a]ml` in their root directories. ```sh npm install [-g] @ast-grep/cli ``` ]], default_config = { - root_dir = [[root_pattern('sgconfig.yaml')]], + root_dir = [[root_pattern('sgconfig.yaml', 'sgconfig.yml')]], }, }, } -- cgit v1.2.3-70-g09d2