highlight_ranges
Add colored line highlights to one or more Neovim buffers simultaneously. Specify file, start and end line, and optional color for each range.
Instructions
Add colored line highlights to one or more Neovim buffers in a single call. This is a visual annotation only — it does not modify buffer content and is not persisted to disk. Highlights stack; calling this adds more highlights without removing previous ones.
highlights: a list of dicts. Each dict requires:
file: path relative to Neovim's cwd (as shown in
get_state). The buffer must be open in Neovim.start_line: first line (1-indexed, inclusive).
end_line: last line (1-indexed, inclusive).
color (optional): hex color or Neovim color name. Defaults to "#3b4048". Out-of-range lines are clamped.
Use this when you need to highlight several ranges at once (possibly
across different files). Use highlight_range for a single range.
Use clear_highlights to remove all highlights from a buffer.
Returns a list of {highlighted} results in the same order as the input. Raises an error if any item is missing required keys.
Example: [{"file": "foo.py", "start_line": 1, "end_line": 3, "color": "#5f3a3a"}, {"file": "foo.py", "start_line": 10, "end_line": 12}]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| highlights | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |