mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-04 15:09:40 +00:00
Documentation: Add formatting section to nvim documenation
This commit is contained in:
parent
ed67a877a3
commit
64b1d4dc8b
|
@ -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…
Reference in a new issue