mirror of https://github.com/LazyVim/starter
31 lines
781 B
Lua
31 lines
781 B
Lua
return {
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
opts = {
|
|
ensure_installed = {
|
|
"svelte",
|
|
},
|
|
servers = {
|
|
eslint = {
|
|
settings = {
|
|
-- helps eslint find the eslintrc when it's placed in a subfolder instead of the cwd root
|
|
workingDirectories = { mode = "location" },
|
|
},
|
|
|
|
}
|
|
},
|
|
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,
|
|
},
|
|
},
|
|
},
|
|
}
|