Move lsp config to local file structure
This commit is contained in:
parent
e5c3bb2492
commit
20801272fc
383 changed files with 11829 additions and 114 deletions
25
.config/nvim/lsp/astro.lua
Normal file
25
.config/nvim/lsp/astro.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---@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
|
||||
--- ```
|
||||
|
||||
local util = require 'lspconfig.util'
|
||||
|
||||
---@type vim.lsp.Config
|
||||
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 = util.get_typescript_server_path(config.root_dir)
|
||||
end
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue