home: vim: add 'shellcheck' code actions
This commit is contained in:
parent
9c023b78a3
commit
6da1c47472
|
@ -60,6 +60,12 @@ null_ls.register({
|
|||
|
||||
-- Shell (non-POSIX)
|
||||
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({
|
||||
-- Show error code in message
|
||||
diagnostics_format = "[#{c}] #{m}",
|
||||
|
@ -83,6 +89,12 @@ null_ls.register({
|
|||
|
||||
-- Shell (POSIX)
|
||||
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({
|
||||
-- Show error code in message
|
||||
diagnostics_format = "[#{c}] #{m}",
|
||||
|
|
Loading…
Reference in a new issue