lsp: add biome
This commit is contained in:
parent
17e6b4454a
commit
c3970748a9
1 changed files with 4 additions and 1 deletions
5
init.lua
5
init.lua
|
|
@ -343,6 +343,9 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
clangd = {
|
clangd = {
|
||||||
filetypes = { "c", "cpp" }
|
filetypes = { "c", "cpp" }
|
||||||
},
|
},
|
||||||
|
biome = {
|
||||||
|
cmd = { "pnpm", "exec", "biome", "lsp-proxy" }
|
||||||
|
},
|
||||||
dotls = {},
|
dotls = {},
|
||||||
eslint = {},
|
eslint = {},
|
||||||
gopls = {},
|
gopls = {},
|
||||||
|
|
@ -416,10 +419,10 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
|
||||||
-- Auto format on save
|
-- Auto format on save
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
|
||||||
callback = function()
|
callback = function()
|
||||||
local lsp_format = false
|
|
||||||
if vim.b.disable_format then
|
if vim.b.disable_format then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
local lsp_format = false
|
||||||
for _, client in pairs(vim.lsp.buf_get_clients()) do
|
for _, client in pairs(vim.lsp.buf_get_clients()) do
|
||||||
if client.server_capabilities.documentFormattingProvider then
|
if client.server_capabilities.documentFormattingProvider then
|
||||||
lsp_format = true
|
lsp_format = true
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue