1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-05 22:34:49 +00:00

Documentation: Add formatting section to nvim documenation

This commit is contained in:
Ollrogge 2023-02-03 16:21:04 +01:00 committed by Andrew Kaster
parent ed67a877a3
commit 64b1d4dc8b

View File

@ -67,6 +67,23 @@ conflicts.
> **Note**: `clangd.inlayHints.sep` breaks on `clangd 15.0.6`.
# Formatting
For code formatting the formatter plugin can be used.
```vim
Plug 'mhartington/formatter.nvim'
```
### Configuration
To use the formatter plugin one needs to opt-in to specific formatters. An example lua configuration which uses clang-format for cpp files:
```lua
require("formatter").setup{
filetype = {
cpp = {
require("formatter.filetypes.cpp").clangformat
}
}
}
```
# Install git blame (Optional)
```vim