mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 01:26:46 +00:00
23 lines
640 B
Lua
23 lines
640 B
Lua
---@brief
|
|
---
|
|
--- 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
|
|
--- ```
|
|
|
|
return {
|
|
cmd = { 'astro-ls', '--stdio' },
|
|
filetypes = { 'astro' },
|
|
root_markers = { 'package.json', 'tsconfig.json', 'jsconfig.json', '.git' },
|
|
init_options = {
|
|
typescript = {},
|
|
},
|
|
before_init = function(_, config)
|
|
if config.init_options and config.init_options.typescript and not config.init_options.typescript.tsdk then
|
|
config.init_options.typescript.tsdk = 'node_modules/typescript/lib'
|
|
end
|
|
end,
|
|
}
|