mirror of
https://github.com/neovim/neovim
synced 2025-07-16 17:21:49 +00:00
build: add formatting targets for c and lua files (#19488)
The targets will only format files that have been changed in current branch compared to the master branch. This includes unstaged, staged and committed files. Add following make and cmake targets: formatc - format changed c files formatlua - format changed lua files format - run formatc and formatlua Remove scripts/uncrustify.sh as this deprecates it.
This commit is contained in:
@ -218,6 +218,11 @@ You can lint a single file (but this will _not_ exclude legacy errors):
|
||||
|
||||
### Style
|
||||
|
||||
- You can format files by using:
|
||||
```
|
||||
make format
|
||||
```
|
||||
This will format changed Lua and C files with all appropriate flags set.
|
||||
- Style rules are (mostly) defined by `src/uncrustify.cfg` which tries to match
|
||||
the [style-guide]. To use the Nvim `gq` command with `uncrustify`:
|
||||
```
|
||||
|
Reference in New Issue
Block a user