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

View File

@ -77,6 +77,30 @@ return {
capabilities = capabilities, capabilities = capabilities,
}) })
end, 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() ["dockerls"] = function()
lspconfig["dockerls"].setup({ lspconfig["dockerls"].setup({
settings = { settings = {