From 80ed1240ec6a6f26013c5484ef3661c8964beb51 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sun, 2 Jun 2024 16:20:40 +0900 Subject: feat(packs): add nvim-lint --- fnl/nvrc/pack.fnl | 1 + fnl/nvrc/packs/lint.fnl | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 fnl/nvrc/packs/lint.fnl (limited to 'fnl') diff --git a/fnl/nvrc/pack.fnl b/fnl/nvrc/pack.fnl index fd89e91..59f3e7a 100644 --- a/fnl/nvrc/pack.fnl +++ b/fnl/nvrc/pack.fnl @@ -32,6 +32,7 @@ (pack :rcarriga/nvim-dap-ui {:init :dapui :lazy true}) (pack :nvim-neotest/nvim-nio {:lazy true})]} :lazy true) +(pack! :mfussenegger/nvim-lint {:req :lint :event [:BufReadPre :BufNewFile]}) (pack! :gpanders/editorconfig.nvim) (pack! :stefandtw/quickfix-reflector.vim {:ft :qf}) (pack! :lewis6991/gitsigns.nvim {:init :gitsigns :event :BufReadPost}) diff --git a/fnl/nvrc/packs/lint.fnl b/fnl/nvrc/packs/lint.fnl new file mode 100644 index 0000000..304b7d8 --- /dev/null +++ b/fnl/nvrc/packs/lint.fnl @@ -0,0 +1,11 @@ +(import-macros {: ag! + : au!} :nvrc.macro.event) +(local nvim-lint (require :lint)) + +(tset nvim-lint :linters_by_ft {:nix [:nix]}) + +(ag! nvim-lint + (au! [BufEnter BufWritePost InsertLeave TextChangedI] * (do + (nvim-lint.try_lint) + ; linters that will run on any filetype + (nvim-lint.try_lint [:codespell])))) -- cgit 1.4.1