-
Notifications
You must be signed in to change notification settings - Fork 62
feat: add mini.files support #89
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
Conversation
a1403a6
to
07459d5
Compare
Hey @jdurand, thanks for the PR. Could you please format the code with Could you also add a test fixture for mini.files in the fixtures folder? |
6dff4c8
to
7d52381
Compare
Fix openDiff blocking operations failing in test environment due to incorrect coroutine context detection. In Lua 5.4, coroutine.running() returns (thread, is_main) where is_main indicates if running in main thread vs coroutine. Changes: - Update diff.lua: Fix open_diff_blocking coroutine check - Update tools/open_diff.lua: Fix handler coroutine validation - Update tests: Add proper mocking and expected error messages
Add mini.files integration following the same pattern as netrw support. - Add _get_mini_files_selection() function to integrations.lua - Support both visual selection and single file under cursor - Add comprehensive test suite with 12 test cases - Handle error cases and edge conditions gracefully
This update introduces support for visual mode multi-file selection in mini.files integration. Users can now select multiple files in visual mode and send them all to Claude Code at once.
7d52381
to
6e99e19
Compare
@ThomasK33 I added the fixtures based on the structure you set up, but I wasn’t able to use them on my local env. Let me know if that works for you. |
…d variable Change-Id: I277a88d244cb84f517a4b899293a00408293041f Signed-off-by: Thomas Kosiewski <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from some dead or unfinished code, LGTM.
Heh. I just opened this repo to do a search on "fixtures" and found, along with the dev info I was seeking, this PR. I'm within a day or two of submitting the same PR to accommodate my being a longtime user of mini.files, which I'm now using with claudecode.nvim. I'll take this opportunity to say that I've been amazed by the engineering skills of @ThomasK33 et al. on display in this plugin -- I've learned a lot. And also, just as a user of Claude Code, thanks for the plugin! |
Summary
Changes Made
_get_mini_files_selection()
function tointegrations.lua
get_selected_files_from_tree()
Builds on the netrw support PR and extends claudecode.nvim to work with the mini.files file explorer.
Bonus
Fix openDiff blocking operations failing in test environment due to
incorrect coroutine context detection. In Lua 5.4, coroutine.running()
returns (thread, is_main) where is_main indicates if running in main
thread vs coroutine.
Changes: