All notable changes to the cd-project.nvim plugin will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Refactored Telescope adapter to follow a modular pattern similar to bookmarks.nvim with a
format_entrymethod - Added functionality to delete project entries using
<c-d>in the Telescope picker - Introduced unique project IDs to ensure accurate deletion of projects with duplicate names
- Added support for opening projects in split and vertical split views in Telescope picker
- Enhanced hooks system to filter by
cd_cmdtype
- Breaking Change: Updated project data structure to include a mandatory unique
idfield. Existing projects without an ID will be automatically assigned one, but custom scripts or tools relying on the old structure may need updates. - Modified project deletion logic to use unique IDs instead of names for improved accuracy
- Improved
cd_projectfunction to passcd_cmdto hooks for better customization - Reordered execution in
cd_projectto restore position before executing AFTER_CD hooks - Removed debug print statements from
position.luafor cleaner operation
- New feature to sort projects in the Telescope picker by last visited time (
visited_at) - Current project is always placed at the bottom of the project list in the picker
- Updated project data structure to include
visited_attimestamp - Enhanced project retrieval to sort by last visited time
- Modified
cd_projectfunction to updatevisited_attimestamp on project switch - Adjusted Telescope adapter to move the current project to the end of the list
- New feature to remember the last position in a project, including the last opened file and cursor position
- Configuration option
remember_project_positionto toggle this feature (enabled by default) - User commands
CdProjectSavePositionandCdProjectRestorePositionfor manual control over position tracking
- Updated project data structure to store last file and cursor position
- Enhanced
cd_projectfunction to save position before switching and restore position after switching
- Initial plugin implementation
- Project directory detection based on common markers (.git, package.json, etc.)
- Multiple UI adapters (vim-ui and telescope)
- Project configuration storage in JSON format
- Auto-registration of projects (optional)
- Customizable hooks for project directory changes
- Commands for adding and switching between projects
- Simplified tab handling by consolidating functionality into the main cd_project function
- Changed keybinding for opening in new tab from to for better mnemonic association
- Improved tab detection and switching logic
- Enhanced project navigation with multiple context options:
- Default: Change directory for all windows (
cd) - New tab: Open project in a new tab with
<c-t>(tabe | tcd) - Window-local: Change directory only for current window with
<c-e>(lcd)
- Default: Change directory for all windows (
- Removed redundant cd_project_in_tab function and related code
- Fixed inconsistent indentation in telescope adapter
- Streamlined project directory handling logic
- Improved tab detection to prevent duplicate tabs of the same project
- Initial release