feat: config eslint

pull/99/head
fm39hz-workstation 2024-05-25 21:05:37 +07:00 committed by fm39hz-laptop
parent 86ba1d10ce
commit c60085d880
1 changed files with 17 additions and 0 deletions

View File

@ -68,4 +68,21 @@ return {
close_if_last_window = true, close_if_last_window = true,
}, },
}, },
{
"neovim/nvim-lspconfig",
opts = {
servers = { eslint = {} },
setup = {
eslint = function()
require("lazyvim.util").lsp.on_attach(function(client)
if client.name == "eslint" then
client.server_capabilities.documentFormattingProvider = true
elseif client.name == "tsserver" then
client.server_capabilities.documentFormattingProvider = false
end
end)
end,
},
},
},
} }