Skip to content

Commit d76c99f

Browse files
author
Blink
committed
fix: correct neo-tree API call
1 parent ea969b6 commit d76c99f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim):
5050
config = true,
5151
keys = {
5252
{ "<leader>ac", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude" },
53-
{ "<leader>as", "<cmd>ClaudeCodeSendSelection<cr>", mode = "v", desc = "Send to Claude" },
53+
{ "<leader>av", "<cmd>ClaudeCodeSendSelection<cr>", mode = "v", desc = "Send Visual Selection" },
5454
-- Add file from nvim-tree or neo-tree
55-
{ "<leader>ca", "<cmd>ClaudeCodeTreeAddFile<cr>", desc = "ClaudeCode: Add file from tree", ft = { "NvimTree", "neo-tree" } },
55+
{ "<leader>as", "<cmd>ClaudeCodeTreeAddFile<cr>", desc = "Send File From Tree", ft = { "NvimTree", "neo-tree" } },
5656
},
5757
}
5858
```
@@ -62,9 +62,9 @@ That's it! For more configuration options, see [Advanced Setup](#advanced-setup)
6262
## Usage
6363

6464
1. **Launch Claude**: Run `:ClaudeCode` to open Claude in a split terminal
65-
2. **Send context**:
66-
- Select text and run `:'<,'>ClaudeCodeSendSelection` to send it to Claude
67-
- Use the keymap you configured to add a file from `nvim-tree` or `neo-tree`
65+
2. **Send context**:
66+
- Select text in visual mode and use `<leader>av` to send it to Claude
67+
- In `nvim-tree` or `neo-tree`, press `<leader>as` on a file to add it to the context
6868
3. **Let Claude work**: Claude can now:
6969
- See your current file and selections in real-time
7070
- Open files in your editor

lua/claudecode/integrations.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function M.get_path_from_tree()
1212
elseif vim.bo.filetype == "neo-tree" then
1313
local success, manager = pcall(require, "neo-tree.sources.manager")
1414
if success and manager then
15-
local state = manager.get_state()
15+
local state = manager.get_state("filesystem")
1616
if state and state.tree then
1717
local node = state.tree:get_node()
1818
if node and node.path then

0 commit comments

Comments
 (0)