mirror of
https://github.com/marianozunino/nvim.git
synced 2025-06-28 18:43:50 -03:00
chore: remove ecolog, i don't use it
This commit is contained in:
parent
c48f8a2b92
commit
1020911f18
7 changed files with 164 additions and 105 deletions
14
.githooks/pre-commit
Executable file
14
.githooks/pre-commit
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
STYLUA_PATH="$HOME/.local/share/nvim/mason/bin/stylua"
|
||||
|
||||
if [[ -x "$STYLUA_PATH" ]]; then
|
||||
LUA_FILES=$(git diff --cached --name-only --diff-filter=AM | grep '\.lua$')
|
||||
|
||||
if [ -n "$LUA_FILES" ]; then
|
||||
echo "$LUA_FILES" | xargs "$STYLUA_PATH"
|
||||
echo "$LUA_FILES" | xargs git add
|
||||
fi
|
||||
else
|
||||
echo "Error: stylua not found. Please install it via Mason."
|
||||
exit 1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue