diff options
| author | Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com> | 2023-11-08 17:20:11 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-09 09:20:11 +0800 |
| commit | d5f76f9d2fea7ac832f08dd7a503a2a4912c452c (patch) | |
| tree | 8f33670e63b20b895fced6d1dadb220ea58b3b42 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-d5f76f9d2fea7ac832f08dd7a503a2a4912c452c.tar nvim-lspconfig-d5f76f9d2fea7ac832f08dd7a503a2a4912c452c.tar.gz nvim-lspconfig-d5f76f9d2fea7ac832f08dd7a503a2a4912c452c.tar.bz2 nvim-lspconfig-d5f76f9d2fea7ac832f08dd7a503a2a4912c452c.tar.lz nvim-lspconfig-d5f76f9d2fea7ac832f08dd7a503a2a4912c452c.tar.xz nvim-lspconfig-d5f76f9d2fea7ac832f08dd7a503a2a4912c452c.tar.zst nvim-lspconfig-d5f76f9d2fea7ac832f08dd7a503a2a4912c452c.zip | |
fix: improve root_dir pattern for ast-grep (#2882)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/ast_grep.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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')]], }, }, } |
