Add documentation for: - Graph caching system with mtime-based invalidation - Layout algorithm optimizations (Barnes-Hut, reduced iterations) - New commands: :IdeaGraph rebuild, :IdeaGraphClearCache - File scanning improvements
5.7 KiB
5.7 KiB
Changelog
All notable changes to ideaDrop.nvim will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
🕸️ Graph Visualization (Obsidian-style)
A new force-directed graph view that visualizes connections between your notes:
-
Graph Data Model: Parses
[[Note Name]]wiki-style links from markdown files- Supports
[[link|alias]]format - Builds bidirectional edges (undirected graph)
- Extracts tags and folder metadata for filtering
- Supports
-
Force-Directed Layout: Implements Fruchterman-Reingold algorithm
- Spring forces attract connected nodes
- Repulsion forces prevent node overlap
- Gravity pulls high-degree nodes toward center
- Inverse gravity pushes orphan nodes to periphery
- Temperature-based cooling for stable convergence
- Supports both synchronous and animated layout modes
-
Visual Rendering:
- Dark background canvas for visual clarity
- Node size scales with degree (number of connections)
- Color-coded nodes: blue (default), purple (hubs), gray (orphans), red (selected)
- Semi-transparent edge lines showing connections
- Labels for selected and high-degree nodes
-
Interactive Features:
h/j/k/lnavigation between nodesEnterto open selected note in right-side buffertfilter by tag,ffilter by folder,rreset filter+/-zoom in/out,ccenter graphLtoggle labels,?toggle help overlayq/Escclose graph,Rrefresh graph data- Smooth layout reflow when nodes are filtered
-
New Commands:
:IdeaGraph- Opens the graph visualization:IdeaGraph animate- Opens with animated layout:IdeaGraph refresh- Refreshes graph data:IdeaGraph rebuild- Force full cache rebuild:IdeaGraph close- Closes the graph window:IdeaGraphFilter tag <name>- Filter graph by tag:IdeaGraphFilter folder <name>- Filter graph by folder:IdeaGraphClearCache- Clear the graph cache file
-
New Configuration Options:
graph.animate- Enable animated layout (default: false)graph.show_orphans- Show nodes without connections (default: true)graph.show_labels- Show node labels by default (default: true)graph.node_colors- Custom colors by folder/tag
-
New Files:
lua/ideaDrop/ui/graph/types.lua- Type definitionslua/ideaDrop/ui/graph/data.lua- Graph data modellua/ideaDrop/ui/graph/layout.lua- Force-directed layout algorithmlua/ideaDrop/ui/graph/renderer.lua- Character-based canvas rendererlua/ideaDrop/ui/graph/init.lua- Main graph modulelua/ideaDrop/ui/graph/cache.lua- Caching system for fast loading
⚡ Graph Performance Optimizations
Fast loading system similar to Obsidian's caching approach:
-
Caching System (
cache.lua):- Stores parsed links and tags per file in
.ideadrop-graph-cache.json - Only re-parses files that have been modified (mtime-based invalidation)
- First load scans all files, subsequent loads are nearly instant
- Cache stored in idea_dir alongside your notes
- Stores parsed links and tags per file in
-
Layout Algorithm Optimizations:
- Reduced max iterations (300 → 100) for faster convergence
- Barnes-Hut approximation for large graphs (100+ nodes)
- Skip distant node pairs in repulsion calculations
- Local math function caching for speed
- Tuned force parameters for faster stabilization
-
File Scanning:
- Uses
vim.fs.findfor faster directory scanning (Neovim 0.8+) - Fallback to glob for older versions
- Better path handling with environment variable expansion
- Uses
Other Additions
- Added
CHANGELOG.mdto track project changes - Added
llms.txtfor AI/LLM context about the project - Added graph-related constants and settings in
constants.lua - Added graph-related notification messages
Changed
- Updated help documentation (
doc/ideaDrop.txt) to include all commands:IdeaBuffer,IdeaRight,IdeaTree, tag commands, and search commands - Improved nvim-tree integration to preserve user's existing nvim-tree configuration
- Updated
README.mdwith comprehensive graph visualization documentation - Extended configuration options to include graph settings
Fixed
- Critical: Fixed glob pattern bug where files were not being found due to missing path separator (
/) between directory and pattern inlist.lua,tags.lua, andsearch.lua - Critical: Fixed nvim-tree integration that was overriding user's nvim-tree configuration on every
:IdeaTreecall. Now uses nvim-tree API directly without callingsetup() - Fixed deprecated Neovim API usage: replaced
vim.api.nvim_buf_set_option()andvim.api.nvim_win_set_option()withvim.bo[]andvim.wo[]insidebar.lua - Fixed missing arguments in
sidebar.open()call inlist.luawhich could cause unexpected behavior - Removed unused variable in
tags.lua(filenameinshow_files_with_tagfunction)
[1.0.0] - Initial Release
Added
- Multiple view modes: floating window, current buffer, right-side buffer
- Smart tagging system with
#tagformat - Advanced fuzzy search through titles and content
- nvim-tree integration for file browsing
- Markdown support with syntax highlighting
- Auto-save functionality
- Date-based file organization
- Nested folder support
Commands
:Idea- Open idea in floating window:IdeaBuffer- Open idea in current buffer:IdeaRight- Open idea in right-side buffer:IdeaTree- Open file tree browser:IdeaTags- Browse and filter by tags:IdeaAddTag/:IdeaRemoveTag- Manage tags:IdeaSearch/:IdeaSearchContent/:IdeaSearchTitle- Search functionality