From 441967f0ae6ca282a9100ba014a0018e5dd55f0f Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Thu, 4 Aug 2022 09:16:25 +0200 Subject: [PATCH] Constrain buf linting to the current file --- .config/nvim/lua/plugins/null-ls.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/plugins/null-ls.lua b/.config/nvim/lua/plugins/null-ls.lua index 7a2339f..9db0e76 100644 --- a/.config/nvim/lua/plugins/null-ls.lua +++ b/.config/nvim/lua/plugins/null-ls.lua @@ -8,7 +8,9 @@ null_ls.setup({ builtins.formatting.shfmt, builtins.formatting.buildifier, builtins.completion.spell, - builtins.diagnostics.buf, + builtins.diagnostics.buf.with({ + args = { "lint", "--path", "$FILENAME" }, + }), builtins.diagnostics.buildifier, builtins.diagnostics.cue_fmt, },