From aeab462a8bf17db7ad0ce1a7776dc05f47916e8c Mon Sep 17 00:00:00 2001 From: "Radu Macocian (admac)" Date: Mon, 1 Jun 2026 09:13:02 +0200 Subject: [PATCH] fixed eslint --- .config/nvim/after/plugin/lspconfig.lua | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.config/nvim/after/plugin/lspconfig.lua b/.config/nvim/after/plugin/lspconfig.lua index 77cb9b0..134363a 100644 --- a/.config/nvim/after/plugin/lspconfig.lua +++ b/.config/nvim/after/plugin/lspconfig.lua @@ -41,12 +41,18 @@ vim.lsp.config("eslint", { root_markers = { ".eslintrc", ".eslintrc.json", ".eslintrc.js", "package.json", ".git" }, filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact", "vue", "svelte" }, settings = { - validate = "on", - packageManager = "npm", - workingDirectory = { mode = "auto" }, - debug = true, - format = true, + eslint = { + validate = "on", + packageManager = "npm", + workingDirectory = { mode = "auto" }, + debug = true, + format = { enable = true }, + } }, + on_attach = function(client, bufnr) + client.server_capabilities.documentFormattingProvider = true + client.server_capabilities.documentRangeFormattingProvider = true + end, }) vim.lsp.enable({ "angularls", "ts_ls", "odoo_ls", "hls", "ruff", "eslint", "cssls", "lua_ls", "lemminx", "qmlls" })