Skip to content

Commit 532fa74

Browse files
authored
Merge pull request #2 from bigcodegen/develop
Merge 0.3.0
2 parents 0dd3958 + f2ca1e3 commit 532fa74

File tree

5 files changed

+1114
-33
lines changed

5 files changed

+1114
-33
lines changed

README.md

+23-9
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,50 @@ A proof of concept integration between Claude Desktop and Neovim using Model Con
1717
### Resources
1818

1919
- `nvim://session`: Current neovim text editor session
20+
- `nvim://buffers`: List of all open buffers in the current Neovim session with metadata including modified status, syntax, and window IDs
2021

2122
### Tools
2223
- **vim_buffer**
2324
- Current VIM text editor buffer with line numbers shown
2425
- Input `filename` (string)
2526
- Filename is ignored, returns a string of numbered lines with the current active buffer content
2627
- **vim_command**
27-
- Send a command to VIM for navigation, spot editing, and line deletion.
28+
- Send a command to VIM for navigation, spot editing, and line deletion
2829
- Input `command` (string)
29-
- Runs a vim command first passed through `nvim.replaceTermcodes`. Multiple commands will work if separated by newlines.
30+
- Runs a vim command first passed through `nvim.replaceTermcodes`. Multiple commands will work if separated by newlines
3031
- On error, `'nvim:errmsg'` contents are returned
3132
- **vim_status**
3233
- Get the status of the VIM editor
33-
- Status contains line, col, mode, filename, and visual selection
34+
- Status contains cursor position, mode, filename, visual selection, window layout, current tab, marks, registers, and working directory
3435
- **vim_edit**
35-
- Edit lines using insert or replace in the VIM editor.
36+
- Edit lines using insert or replace in the VIM editor
3637
- Input `startLine` (number), `mode` (`"insert"` | `"replace"`), `lines` (string)
37-
- insert will insert lines at startLine. replace will replace lines starting at the startLine to the end of the buffer.
38+
- insert will insert lines at startLine. replace will replace lines starting at the startLine to the end of the buffer
39+
- **vim_window**
40+
- Manipulate Neovim windows (split, vsplit, close, navigate)
41+
- Input `command` (string: "split", "vsplit", "only", "close", "wincmd h/j/k/l")
42+
- Allows window management operations
43+
- **vim_mark**
44+
- Set a mark at a specific position
45+
- Input `mark` (string: a-z), `line` (number), `column` (number)
46+
- Sets named marks at specified positions
47+
- **vim_register**
48+
- Set content of a register
49+
- Input `register` (string: a-z or "), `content` (string)
50+
- Manages register contents
51+
- **vim_visual**
52+
- Make a visual selection
53+
- Input `startLine` (number), `startColumn` (number), `endLine` (number), `endColumn` (number)
54+
- Creates visual mode selections
3855

3956
Using this simple set of tools, Claude can peer into your neovim session to answer questions as well as make edits to the buffer.
4057

4158
## Limitations
4259

4360
- This is a quick proof of concept to experiment with Model Context Protocol. Use at your own risk.
4461
- May not interact well with a custom neovim config!
45-
- It may or may not be properly handling the socket connections to neovim.
4662
- Error handling could be better.
47-
- Sometimes Claude doesn't get the vim command input just right or the way I am passing it along doesn't agree.
48-
- Reading the output from a vim command needs improvement.
49-
- Support for multiple buffers/windows.
63+
- Sometimes Claude doesn't get the vim command input just right.
5064

5165
## Usage with Claude Desktop
5266
Add this to your `claude_desktop_config.json`:

0 commit comments

Comments
 (0)