diff options
| author | Piero Lescano <lescaspv@gmail.com> | 2022-04-16 21:25:25 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-16 19:25:25 -0700 |
| commit | 07151b8be50130cb3784da727673c0182f73d18f (patch) | |
| tree | f1001abff75fb0e880f70efc4c44da314aa2317f /lua | |
| parent | fix(clarity_lsp): remove .cmd suffix for Windows (#1835) (diff) | |
| download | nvim-lspconfig-07151b8be50130cb3784da727673c0182f73d18f.tar nvim-lspconfig-07151b8be50130cb3784da727673c0182f73d18f.tar.gz nvim-lspconfig-07151b8be50130cb3784da727673c0182f73d18f.tar.bz2 nvim-lspconfig-07151b8be50130cb3784da727673c0182f73d18f.tar.lz nvim-lspconfig-07151b8be50130cb3784da727673c0182f73d18f.tar.xz nvim-lspconfig-07151b8be50130cb3784da727673c0182f73d18f.tar.zst nvim-lspconfig-07151b8be50130cb3784da727673c0182f73d18f.zip | |
feat: add astro-ls support (#1841)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/astro.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/astro.lua b/lua/lspconfig/server_configurations/astro.lua new file mode 100644 index 00000000..61d5d301 --- /dev/null +++ b/lua/lspconfig/server_configurations/astro.lua @@ -0,0 +1,32 @@ +local util = require 'lspconfig.util' + +local bin_name = 'astro-ls' +local cmd = { bin_name, '--stdio' } + +if vim.fn.has 'win32' == 1 then + cmd = { 'cmd.exe', '/C', bin_name, '--stdio' } +end + +return { + default_config = { + cmd = cmd, + filetypes = { 'astro' }, + root_dir = util.root_pattern('package.json', 'tsconfig.json', 'jsconfig.json', '.git'), + init_options = { + configuration = {}, + }, + }, + docs = { + description = [[ +https://github.com/withastro/language-tools/tree/main/packages/language-server + +`astro-ls` can be installed via `npm`: +```sh +npm install -g @astrojs/language-server +``` +]], + default_config = { + root_dir = [[root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")]], + }, + }, +} |
