From f47198c20cebf3324c118b3104adc8fea58b74fd Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 13 Oct 2024 18:52:29 -0500 Subject: [PATCH] Configure nvim-lint --- .config/nvim/lua/plugins/lint.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.config/nvim/lua/plugins/lint.lua b/.config/nvim/lua/plugins/lint.lua index c7d513a..e0ad35d 100644 --- a/.config/nvim/lua/plugins/lint.lua +++ b/.config/nvim/lua/plugins/lint.lua @@ -1,3 +1,14 @@ return { "mfussenegger/nvim-lint", + config = function() + require("lint").linters_by_ft = { + ruby = { "rubocop", "standardrb" }, + } + + vim.api.nvim_create_autocmd({ "BufWritePost" }, { + callback = function() + require("lint").try_lint() + end, + }) + end, }