Reformat all neovim configuration files with stylua
This commit is contained in:
parent
2fb9297281
commit
16e59402c7
16 changed files with 414 additions and 352 deletions
|
@ -24,10 +24,14 @@ fi
|
|||
staged_lua=$(echo "$staged_files" | grep '.lua$' || true)
|
||||
num_staged_lua=$(echo "$staged_lua" | grep -vce '^$' || true)
|
||||
if [ "$num_staged_lua" -gt 0 ]; then
|
||||
printf '\nFormatting %s staged Lua files with lua-format\n' "$num_staged_lua"
|
||||
stylua "$staged_lua"
|
||||
printf '\nFormatting %s staged Lua files with stylua\n' "$num_staged_lua"
|
||||
|
||||
for file in $staged_lua;do
|
||||
stylua "$file"
|
||||
done
|
||||
|
||||
printf "Re-staging\n\n"
|
||||
git add "$staged_lua"
|
||||
git add $staged_lua
|
||||
fi
|
||||
|
||||
# Run shfmt on staged shell scripts
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue