home: vim: add 'shellcheck' code actions
This commit is contained in:
parent
c28710773b
commit
7546417782
|
@ -60,6 +60,12 @@ null_ls.register({
|
||||||
|
|
||||||
-- Shell (non-POSIX)
|
-- Shell (non-POSIX)
|
||||||
null_ls.register({
|
null_ls.register({
|
||||||
|
null_ls.builtins.code_actions.shellcheck.with({
|
||||||
|
-- Restrict to bash and zsh
|
||||||
|
filetypes = { "bash", "zsh" },
|
||||||
|
-- Only used if available
|
||||||
|
condition = utils.is_executable_condition("shellcheck"),
|
||||||
|
}),
|
||||||
null_ls.builtins.diagnostics.shellcheck.with({
|
null_ls.builtins.diagnostics.shellcheck.with({
|
||||||
-- Show error code in message
|
-- Show error code in message
|
||||||
diagnostics_format = "[#{c}] #{m}",
|
diagnostics_format = "[#{c}] #{m}",
|
||||||
|
@ -83,6 +89,12 @@ null_ls.register({
|
||||||
|
|
||||||
-- Shell (POSIX)
|
-- Shell (POSIX)
|
||||||
null_ls.register({
|
null_ls.register({
|
||||||
|
null_ls.builtins.code_actions.shellcheck.with({
|
||||||
|
-- Restrict to POSIX sh
|
||||||
|
filetypes = { "sh" },
|
||||||
|
-- Only used if available
|
||||||
|
condition = utils.is_executable_condition("shellcheck"),
|
||||||
|
}),
|
||||||
null_ls.builtins.diagnostics.shellcheck.with({
|
null_ls.builtins.diagnostics.shellcheck.with({
|
||||||
-- Show error code in message
|
-- Show error code in message
|
||||||
diagnostics_format = "[#{c}] #{m}",
|
diagnostics_format = "[#{c}] #{m}",
|
||||||
|
|
Loading…
Reference in a new issue