about summary refs log tree commit diff
path: root/fnl/nvrc
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/nvrc')
-rw-r--r--fnl/nvrc/pack.fnl1
-rw-r--r--fnl/nvrc/packs/lint.fnl11
2 files changed, 12 insertions, 0 deletions
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]))))