-
Notifications
You must be signed in to change notification settings - Fork 21
feat: add nvim-tree and neotree integration #22
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
993fc6d
to
9952bd4
Compare
Change-Id: I22a048a068ce66e6f6ee8c4177a2a78178ab6616 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Enable diff tool to handle file creation by displaying empty buffer comparison for non-existent files instead of erroring. Includes automatic parent directory creation and updated test expectations. Change-Id: I0032117b04309c63b605e21390083abb9ec741b2 Signed-off-by: Thomas Kosiewski <tk@coder.com>
- Replace fallback to single-file selection with line-by-line node mapping - Support visual line selection (V), character selection (v), and block selection (Ctrl-V) - Add comprehensive test suite for nvim-tree visual selection scenarios - Include deduplication and root-level file filtering - Maintain compatibility with existing nvim-tree marks functionality Fixes issue where multi-selection in nvim-tree only sent cursor file instead of all selected files. Change-Id: Ida7b3154f0b6749903ff0e847752d5c263a09de7 Signed-off-by: Thomas Kosiewski <tk@coder.com>
9952bd4
to
1ef01d3
Compare
Shouldn't we have just a regular |
- Extract broadcast_at_mention() for single file broadcasts - Extract add_paths_to_claude() for batch operations with optional delays - Refactor all existing handlers to use centralized functions - Add ClaudeCodeAdd <file-path> command for direct file addition - Remove verbose comments that describe "what" instead of "why" - Add comprehensive documentation to README with examples - Add 13 test cases covering command registration, validation, and functionality - Maintain all existing functionality and test compatibility (164 tests passing) Change-Id: I171dbc0bcc82d72c5c9a4f3d891a71fc3c814dbc Signed-off-by: Thomas Kosiewski <tk@coder.com>
Great point. I'll add both direct integrations and a |
- Add optional start-line and end-line arguments to ClaudeCodeAdd command - Convert 1-indexed user input to 0-indexed for Claude compatibility - Add comprehensive validation for line numbers (positive, start <= end) - Ignore line numbers for directories with debug logging - Remove redundant vim.notify calls (logger handles notifications) - Update README with line range syntax and examples - Add extensive test coverage for all line range scenarios - Clean up chatty comments that describe obvious operations Change-Id: Ied866de821628c6f274faac3c82e527a0eaf46e1 Signed-off-by: Thomas Kosiewski <tk@coder.com>
edccb60
to
03c159f
Compare
- Remove comments that just describe what code does rather than why - Keep valuable LuaDoc annotations and explanatory comments - Remove obvious descriptive comments like "Create directory", "Write to file", etc. - Preserve comments that explain business logic, error handling rationale, or complex algorithms - All tests continue passing (181 successes) Change-Id: Ia019bc6889b7ef969afd49e699d09b3ffaafd8e4 Signed-off-by: Thomas Kosiewski <tk@coder.com>
- Remove redundant code and comments in coverage generation - Streamline coverage report workflow for better maintainability Change-Id: I37ff03afa456e3350409646616f58c0791e63765 Signed-off-by: Thomas Kosiewski <tk@coder.com>
b9d7f44
to
648c90a
Compare
- Enhanced error handling in diff.lua with proper return values - Optimized debug logging to avoid string operations when disabled - Documented timing configuration changes with rationale - Removed redundant comments that added no value - Added backward compatibility for test environments Change-Id: Ic9ac0aa77506114955b740b42ee3d1af0bc7fea0 Signed-off-by: Thomas Kosiewski <tk@coder.com>
- Remove procedural comments that describe obvious code actions - Eliminate redundant explanatory text in function documentation - Replace repeated logger require calls with cached variables - Fix luacheck warning about inefficient loop pattern - Add comprehensive test coverage for edge cases and error handling - Preserve valuable comments that explain "why" not "what" All tests pass (215 successes) with 0 warnings/errors across 61 files. Change-Id: I0c4a606f8508ecc98a6f4202f83bbf5b3599daf6 Signed-off-by: Thomas Kosiewski <tk@coder.com>
## Summary - Add seamless integration with nvim-tree and neo-tree file explorers - Implement @-mention functionality for files and directories via new ClaudeCodeTreeAdd and ClaudeCodeAdd commands - Enable Claude to navigate and understand project file structures through visual selection - Add support for new file creation in diff system with proper directory handling ## New Features - **Tree Integration**: Context-aware <leader>as keybinding that sends text in normal buffers or adds files from tree explorers - **@-mention Commands**: - `:ClaudeCodeTreeAdd` - Add selected files from tree explorers to Claude context - `:ClaudeCodeAdd <path> [start] [end]` - Add files/directories by path with optional line ranges - **Enhanced Diff System**: Support for creating new files with automatic parent directory creation - **Visual Selection**: Improved multi-file selection detection for both nvim-tree and neo-tree ## Technical Improvements - Comprehensive test coverage with dedicated specs for @-mention functionality - Improved error handling and user feedback for edge cases - Enhanced build system with Nix integration for consistent development environment - Code cleanup and maintainability improvements throughout codebase ## Breaking Changes None - all changes are additive and backward compatible. Fixes coder#14 Merge pull request coder#22 from coder/thomask33/nvim-tree-integration
This release includes significant feature additions and bug fixes: **Version Updates:** - Updated main version table in lua/claudecode/init.lua (0.1.0-alpha → 0.2.0) - Updated client versions in scripts/claude_interactive.sh (3 locations) - Updated ClaudeCodeNvim version in scripts/lib_claude.sh - Removed prerelease flag for stable release **Documentation:** - Added comprehensive CHANGELOG.md with v0.2.0 release notes - Documented all merged PRs since v0.1.0 with proper references - Updated CLAUDE.md with detailed release process documentation - Fixed diff keymap references in README.md (<leader>da → <leader>aa) **Features Added (since v0.1.0):** - Diagnostics integration (#34) - File explorer support for oil.nvim, nvim-tree, neotree (#27, #22) - Enhanced terminal management with ClaudeCodeFocus command (#40) - Auto terminal provider detection (#36) - Customizable diff keymaps via LazyVim spec (#47) **Bug Fixes:** - Terminal focus errors when buffer hidden (#43) - Improved diff acceptance behavior (#41) - Fixed syntax highlighting in proposed diff view (#32) - Visual selection range handling improvements (#26) - Native terminal bufhidden behavior (#39) All code quality checks pass and documentation is updated for maintainability. Change-Id: I0e4e7c9bae98df922356dc8b8aa0acd7e8293a48 Signed-off-by: Thomas Kosiewski <tk@coder.com>
This release includes significant feature additions and bug fixes: **Version Updates:** - Updated main version table in lua/claudecode/init.lua (0.1.0-alpha → 0.2.0) - Updated client versions in scripts/claude_interactive.sh (3 locations) - Updated ClaudeCodeNvim version in scripts/lib_claude.sh - Removed prerelease flag for stable release **Documentation:** - Added comprehensive CHANGELOG.md with v0.2.0 release notes - Documented all merged PRs since v0.1.0 with proper references - Updated CLAUDE.md with detailed release process documentation - Fixed diff keymap references in README.md (<leader>da → <leader>aa) **Features Added (since v0.1.0):** - Diagnostics integration (#34) - File explorer support for oil.nvim, nvim-tree, neotree (#27, #22) - Enhanced terminal management with ClaudeCodeFocus command (#40) - Auto terminal provider detection (#36) - Customizable diff keymaps via LazyVim spec (#47) **Bug Fixes:** - Terminal focus errors when buffer hidden (#43) - Improved diff acceptance behavior (#41) - Fixed syntax highlighting in proposed diff view (#32) - Visual selection range handling improvements (#26) - Native terminal bufhidden behavior (#39) All code quality checks pass and documentation is updated for maintainability. Change-Id: I0e4e7c9bae98df922356dc8b8aa0acd7e8293a48 Signed-off-by: Thomas Kosiewski <tk@coder.com>
Fixes #14
Summary
:ClaudeCodeSend
,:ClaudeCodeTreeAdd
, and:ClaudeCodeAdd
for flexible file addition workflowsFeatures
:ClaudeCodeTreeAdd
@-mention Support: Add @filename or @directory/ reference to files and folders using the new command:ClaudeCodeAdd
Direct Path Support: Add files/directories by path with optional line range specificationPerformance Improvements
Command Examples
Test Coverage
Change-Id: I22a048a068ce66e6f6ee8c4177a2a78178ab6616