From 4257f77c6f12151e03af0c2b8f73e756e200ddd1 Mon Sep 17 00:00:00 2001 From: Jeremy Kaplan Date: Sun, 26 Oct 2025 15:39:48 -0400 Subject: [PATCH] neovim: Run all ESLint fixes on save --- neovim/lua/plugins/ide.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/neovim/lua/plugins/ide.lua b/neovim/lua/plugins/ide.lua index ed5d675..ecc10c8 100644 --- a/neovim/lua/plugins/ide.lua +++ b/neovim/lua/plugins/ide.lua @@ -24,6 +24,16 @@ vim.api.nvim_create_autocmd("LspAttach", { end, }) +vim.lsp.config("eslint", { + on_attach = function() + vim.api.nvim_create_autocmd("BufWritePre", { + callback = function() + vim.lsp.buf.code_action({ context = { only = { "source.fixAll.eslint" } }, apply = true }) + end, + }) + end, +}) + return { -- HUD {