LSP format buffer
nvim_lsp_formatFormat a buffer using its language server and apply the changes in place.
Instructions
Format a buffer using its language server and apply the changes in place.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "nvim_lsp_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bufnr | No | Buffer number. Omit for the current buffer. |