diff options
| author | pseudometa <73286100+chrisgrieser@users.noreply.github.com> | 2023-11-06 12:24:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-06 19:24:17 +0800 |
| commit | 1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88 (patch) | |
| tree | 0c8cf8af791b951da23b7c6e4c1700cb8553eb38 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88.tar nvim-lspconfig-1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88.tar.gz nvim-lspconfig-1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88.tar.bz2 nvim-lspconfig-1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88.tar.lz nvim-lspconfig-1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88.tar.xz nvim-lspconfig-1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88.tar.zst nvim-lspconfig-1c5e4dabb5e8e2b43b3bc5a02ad27e81c8e3dd88.zip | |
feat: add ast-grep language server (#2880)
* feat: add ast-grep language server
* fix: casing of filetypes
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/ast_grep.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/ast_grep.lua b/lua/lspconfig/server_configurations/ast_grep.lua new file mode 100644 index 00000000..eba37d6b --- /dev/null +++ b/lua/lspconfig/server_configurations/ast_grep.lua @@ -0,0 +1,38 @@ +local util = require 'lspconfig.util' + +return { + default_config = { + 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_dir = util.root_pattern 'sgconfig.yaml', + single_file_support = true, + }, + docs = { + description = [[ +https://ast-grep.github.io/ + +ast-grep(sg) is a fast and polyglot tool for code structural search, lint, rewriting at large scale. + +```sh +npm install [-g] @ast-grep/cli +``` +]], + default_config = { + root_dir = [[root_pattern('sgconfig.yaml')]], + }, + }, +} |
