Documentation: Add formatting section to nvim documenation
This commit is contained in:
parent
ed67a877a3
commit
64b1d4dc8b
Notes:
sideshowbarker
2024-07-17 07:08:37 +09:00
Author: https://github.com/Ollrogge 🔰 Commit: https://github.com/SerenityOS/serenity/commit/64b1d4dc8b Pull-request: https://github.com/SerenityOS/serenity/pull/17297 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 17 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue