From b8394e6e469c542a73770c97f9de9e715f3be590 Mon Sep 17 00:00:00 2001 From: srdusr Date: Mon, 24 Apr 2023 21:33:53 +0200 Subject: Add shellcheck with options for null-ls --- lua/plugins/lsp.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 778ae94..cb56d61 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -242,7 +242,20 @@ null_ls.setup { extra_args = { "-i", "2", "-ci" }, }), builtins.diagnostics.dotenv_linter, - --builtins.diagnostics.shellcheck, + builtins.diagnostics.shellcheck.with({ + -- shell script diagnostics + diagnostic_config = { + -- see :help vim.diagnostic.config() + underline = true, + virtual_text = false, + signs = true, + update_in_insert = false, + severity_sort = true, + }, + diagnostics_format = "[#{c}] #{m} (#{s})", + -- this will run every time the source runs, + -- so you should prefer caching results if possible + }), builtins.formatting.shellharden, builtins.formatting.trim_whitespace.with { filetypes = { "tmux", "teal", "zsh" } }, builtins.formatting.clang_format, -- cgit v1.2.3