mirror of
https://github.com/belsabbagh/dotfiles.git
synced 2026-04-11 01:26:46 +00:00
commit
This commit is contained in:
@@ -149,4 +149,5 @@ vim.lsp.enable {
|
|||||||
'rust-analyzer',
|
'rust-analyzer',
|
||||||
'tsls',
|
'tsls',
|
||||||
'yamlls',
|
'yamlls',
|
||||||
|
'astrols',
|
||||||
}
|
}
|
||||||
|
|||||||
22
.config/nvim/lsp/astrols.lua
Normal file
22
.config/nvim/lsp/astrols.lua
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
---@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,
|
||||||
|
}
|
||||||
@@ -20,7 +20,7 @@ return {
|
|||||||
},
|
},
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { 'stylua' },
|
lua = { 'stylua' },
|
||||||
|
astro = { 'prettier' },
|
||||||
go = { 'gofmt' },
|
go = { 'gofmt' },
|
||||||
python = { 'ruff' },
|
python = { 'ruff' },
|
||||||
javascript = { 'biome', 'prettier', stop_after_first = true },
|
javascript = { 'biome', 'prettier', stop_after_first = true },
|
||||||
|
|||||||
Reference in New Issue
Block a user