diff options
Diffstat (limited to 'lsp/ast_grep.lua')
| -rw-r--r-- | lsp/ast_grep.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lsp/ast_grep.lua b/lsp/ast_grep.lua new file mode 100644 index 00000000..0e0044e5 --- /dev/null +++ b/lsp/ast_grep.lua @@ -0,0 +1,28 @@ +---@brief +--- +---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 +-- ``` +return { + cmd = { 'ast-grep', 'lsp' }, + filetypes = { -- https://ast-grep.github.io/reference/languages.html + 'c', + 'cpp', + 'rust', + 'go', + 'java', + 'python', + 'javascript', + 'typescript', + 'html', + 'css', + 'kotlin', + 'dart', + 'lua', + }, + root_markers = { 'sgconfig.yaml', 'sgconfig.yml' }, +} |
