@@ -184,6 +184,33 @@ vim.api.nvim_create_autocmd("VimLeavePre", {
184
184
})
185
185
```
186
186
187
+ ### 7. File Explorer Integrations (` integrations.lua ` )
188
+
189
+ Unified interface for popular file explorers:
190
+
191
+ ``` lua
192
+ -- Supports nvim-tree, neo-tree, oil.nvim, and snacks.explorer
193
+ function M .get_selected_files_from_tree ()
194
+ local current_ft = vim .bo .filetype
195
+
196
+ if current_ft == " NvimTree" then
197
+ return M ._get_nvim_tree_selection ()
198
+ elseif current_ft == " neo-tree" then
199
+ return M ._get_neotree_selection ()
200
+ elseif current_ft == " oil" then
201
+ return M ._get_oil_selection ()
202
+ elseif current_ft == " snacks_picker_list" then
203
+ return M ._get_snacks_explorer_selection ()
204
+ end
205
+ end
206
+ ```
207
+
208
+ Key features across all integrations:
209
+ - ** Visual mode support** : Select multiple files using vim visual mode
210
+ - ** Security protection** : Filters out root-level files (` /etc/passwd ` , ` /usr/bin/vim ` )
211
+ - ** Directory handling** : Adds trailing slashes to directories for consistency
212
+ - ** Fallback behavior** : Selected items β current item β error
213
+
187
214
## Module Structure
188
215
189
216
```
@@ -197,6 +224,8 @@ lua/claudecode/
197
224
β βββ client.lua # Connection management
198
225
β βββ utils.lua # Pure Lua SHA-1, base64
199
226
βββ tools/init.lua # MCP tool registry
227
+ βββ integrations.lua # File explorer integrations
228
+ βββ visual_commands.lua # Visual mode handling
200
229
βββ diff.lua # Native diff support
201
230
βββ selection.lua # Selection tracking
202
231
βββ terminal.lua # Terminal management
0 commit comments