add biome lsp

This commit is contained in:
xfy
2025-03-28 10:10:10 +08:00
parent 60b56c39b5
commit 51480b43ef
2 changed files with 25 additions and 1 deletions

View File

@ -59,7 +59,6 @@ end, {
-- mason install command
-- create install all command
-- 优化点:将需要安装的工具列表按照语言或类型分组,提高可读性
local ensure_installed = {
-- LSP servers
lsp_servers = {
@ -81,6 +80,7 @@ local ensure_installed = {
"clangd",
"lemminx", -- xml svg
"deno",
"biome", -- formatter
},
-- Formatters
formatters = {

View File

@ -77,6 +77,30 @@ return {
capabilities = capabilities,
})
end,
["biome"] = function()
lspconfig["biome"].setup({
capabilities = capabilities,
settings = {
cmd = { "biome", "lsp-proxy" },
filetypes = {
"astro",
"css",
"graphql",
"javascript",
"javascriptreact",
"json",
"jsonc",
"svelte",
"typescript",
"typescript.tsx",
"typescriptreact",
"vue",
"markdown",
},
single_file_support = true,
},
})
end,
["dockerls"] = function()
lspconfig["dockerls"].setup({
settings = {