1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 23:40:05 +08:00
SpaceVim/bundle/nvim-lspconfig/lua/lspconfig/server_configurations/astro.lua

33 lines
750 B
Lua
Raw Normal View History

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")]],
},
},
}