File tree Expand file tree Collapse file tree 3 files changed +24
-0
lines changed
Expand file tree Collapse file tree 3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -119,3 +119,11 @@ just test
119119```
120120
121121Will clone and build the currently supported version of the Go treesitter parser and use that for the tests.
122+
123+ ## Git Hooks
124+
125+ To enable the pre-commit hook that runs ` just fmt ` :
126+
127+ ``` bash
128+ git config core.hooksPath hooks
129+ ```
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Run formatter before commit
4+ echo " Running formatter..."
5+ just fmt
6+
7+ # Check if fmt made any changes
8+ if ! git diff --quiet; then
9+ echo " Formatter made changes. Please stage the changes and commit again."
10+ exit 1
11+ fi
12+
13+ echo " Formatting check passed."
Original file line number Diff line number Diff line change 11fmt :
22 stylua lua/ --config-path=stylua.toml
33
4+ fmt-check :
5+ stylua lua/ --check --config-path=stylua.toml
6+
47install-plenary :
58 #!/ bin/ bash
69 echo " ===== Setting up Plenary.nvim ====="
You can’t perform that action at this time.
0 commit comments