mirror of
https://github.com/DefectingCat/nvim
synced 2025-07-15 16:51:33 +00:00
add biome lsp
This commit is contained in:
@ -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 = {
|
||||||
|
@ -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 = {
|
||||||
|
Reference in New Issue
Block a user