diff --git a/lua/plugins/override.lua b/lua/plugins/override.lua index 0a9565f..33e856d 100644 --- a/lua/plugins/override.lua +++ b/lua/plugins/override.lua @@ -68,4 +68,21 @@ return { 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, + }, + }, + }, }