Open files in Neovim
nvim_open_fileOpen one or more files in Neovim buffers and start their LSP clients. Pass a path or array of paths to receive buffer IDs, filetypes, line counts, and attached LSP clients, enabling pre-warming for faster subsequent operations.
Instructions
Open one or more files in Neovim buffers and start their LSP clients. Pass a single path or an array of paths. Returns the buffer id, filetype, line count and attached LSP clients for each file. Optional: use it to pre-warm files or tune wait_ms. Other tools open files on demand.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "nvim_open_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path, or an array of file paths, absolute or relative to the server cwd | |
| wait_ms | No | Milliseconds to wait for the LSP client to attach |