Skip to content

feat: add oil.nvim support for file selection #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add missing oil.nvim filetype checks for window selection
- Add oil filetype check in diff.lua's _find_main_editor_window()
- Add oil filetype check in open_file.lua's find_main_editor_window()
- Add oil filetype check in init.lua's ClaudeCodeSend command

These changes ensure oil.nvim buffers are properly excluded when
searching for main editor windows, preventing diff views and file
opens from appearing in the oil explorer window.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
  • Loading branch information
Peeeaje and claude committed Jun 9, 2025
commit 3a8bb5c11c91b0b890dd87dfd60d7418ba80317a
1 change: 1 addition & 0 deletions lua/claudecode/diff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function M._find_main_editor_window()
or filetype == "neo-tree-popup"
or filetype == "ClaudeCode"
or filetype == "NvimTree"
or filetype == "oil"
or filetype == "aerial"
or filetype == "tagbar"
)
Expand Down
1 change: 1 addition & 0 deletions lua/claudecode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ function M._create_commands()

local is_tree_buffer = current_ft == "NvimTree"
or current_ft == "neo-tree"
or current_ft == "oil"
or string.match(current_bufname, "neo%-tree")
or string.match(current_bufname, "NvimTree")

Expand Down
1 change: 1 addition & 0 deletions lua/claudecode/tools/open_file.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ local function find_main_editor_window()
or filetype == "neo-tree-popup"
or filetype == "ClaudeCode"
or filetype == "NvimTree"
or filetype == "oil"
or filetype == "aerial"
or filetype == "tagbar"
)
Expand Down
Loading