mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:17:35 +00:00
Documentation: Add formatting section to nvim documenation
This commit is contained in:
parent
ed67a877a3
commit
64b1d4dc8b
1 changed files with 17 additions and 0 deletions
|
@ -67,6 +67,23 @@ conflicts.
|
||||||
|
|
||||||
> **Note**: `clangd.inlayHints.sep` breaks on `clangd 15.0.6`.
|
> **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)
|
# Install git blame (Optional)
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue