From 7d8a7f106cf605c36d72956157762782188ca716 Mon Sep 17 00:00:00 2001 From: fm39hz-workstation Date: Sat, 25 May 2024 21:05:37 +0700 Subject: [PATCH] feat: config eslint --- lua/plugins/override.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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, + }, + }, + }, }