home: vim: keep space after shell redirections

This commit is contained in:
Bruno BELANYI 2022-02-25 15:36:31 +01:00
parent f54fbcf793
commit d7a9783ceb
3 changed files with 9 additions and 6 deletions

View file

@ -12,8 +12,9 @@ null_ls.register({
extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" }, extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" },
}), }),
null_ls.builtins.formatting.shfmt.with({ null_ls.builtins.formatting.shfmt.with({
-- Indent with 4 spaces, simplify the code, indent switch cases, use bash dialect -- Indent with 4 spaces, simplify the code, indent switch cases,
extra_args = { "-i", "4", "-s", "-ci", "-ln", "bash" }, -- add space after redirection, use bash dialect
extra_args = { "-i", "4", "-s", "-ci", "-sr", "-ln", "bash" },
}), }),
}) })
EOF EOF

View file

@ -12,8 +12,9 @@ null_ls.register({
extra_args = { "-o", "avoid-nullary-conditions" }, extra_args = { "-o", "avoid-nullary-conditions" },
}), }),
null_ls.builtins.formatting.shfmt.with({ null_ls.builtins.formatting.shfmt.with({
-- Indent with 4 spaces, simplify the code, indent switch cases, use POSIX -- Indent with 4 spaces, simplify the code, indent switch cases,
extra_args = { "-i", "4", "-s", "-ci", "-ln", "posix" }, -- add space after redirection, use POSIX
extra_args = { "-i", "4", "-s", "-ci", "-sr", "-ln", "posix" },
}), }),
}) })
EOF EOF

View file

@ -12,8 +12,9 @@ null_ls.register({
extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" }, extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" },
}), }),
null_ls.builtins.formatting.shfmt.with({ null_ls.builtins.formatting.shfmt.with({
-- Indent with 4 spaces, simplify the code, indent switch cases, use bash dialect -- Indent with 4 spaces, simplify the code, indent switch cases,
extra_args = { "-i", "4", "-s", "-ci", "-ln", "bash" }, -- add space after redirection, use bash dialect
extra_args = { "-i", "4", "-s", "-ci", "-sr", "-ln", "bash" },
}), }),
}) })
EOF EOF