fac Editor Enhancement Targets
🎯 LSP Enhancements
1. Diagnostics Display ✅ (100% Complete!)
- Parse textDocument/publishDiagnostics notifications
- Store diagnostics per file in editor state
- Display error/warning markers in the gutter
- Show diagnostic messages in status line when cursor on error line
- Add diagnostic severity colors (error=red, warning=yellow, info=blue)
- Create diagnostics panel (Ctrl+Shift+D) to list all issues
2. Real-time Updates (didChange) ✅ (90% Complete!)
- Send textDocument/didChange notifications on buffer edits
- Document sync module with version tracking
- Debounce changes to avoid overwhelming the server (500ms delay)
- Send textDocument/didSave notifications on file save (Ctrl+S)
- Integration with buffer change tracking
- Update diagnostics in real-time as user types (server-dependent)
- Implement incremental sync (send only changed portions)
3. Go to Definition ✅ (80% Complete!)
- Implement textDocument/definition request
- Parse LocationLink/Location responses
- Jump to definition location (same file)
- Add jump stack to return to previous location (Alt+,)
- F12 keybinding for go to definition
- Jump to definition in different file (needs tab opening)
- Show preview of definition in tooltip if same file
4. Find References (Shift+F12) ✅ (100% Complete!)
- Implement textDocument/references request
- Create references panel showing all occurrences
- Navigate through references with arrow keys
- Show references with line/column information
- Parse and populate references from LSP response with callback integration
- Jump to selected reference with Enter key
- Load preview context for each reference (enhancement)
- Group references by file (enhancement)
5. Code Actions & Quick Fixes
- Request code actions at cursor position
- Display available actions in popup menu
- Apply workspace edits from code actions
- Support quick fixes for diagnostics
- Add keyboard shortcut (Ctrl+.)
6. Rename Symbol (F2)
- Implement textDocument/rename request
- Show rename prompt with current symbol name
- Apply workspace-wide rename edits
- Preview changes before applying
- Handle rename validation
7. Document Symbols Outline (Ctrl+Shift+O)
- Implement textDocument/documentSymbol request
- Create outline panel showing document structure
- Support hierarchical symbol tree
- Navigate to symbol on selection
- Show symbol kinds with icons/labels
8. Signature Help
- Trigger on '(' and ',' characters
- Show function signature tooltip
- Highlight current parameter
- Handle overloaded functions
- Auto-dismiss when cursor moves away
9. Document Formatting
- Implement textDocument/formatting request
- Add format document command (Shift+Alt+F)
- Support range formatting for selections
- Handle format-on-save option
- Respect .editorconfig settings
10. Workspace Symbols (Ctrl+T)
- Implement workspace/symbol request
- Create fuzzy search interface
- Show symbol kind and location
- Navigate to selected symbol
- Support incremental search
🔧 Editor Core Improvements
11. Multiple Cursors Enhancement
- Add cursor at next occurrence (Ctrl+D)
- Add cursors above/below (Ctrl+Alt+Up/Down)
- Select all occurrences (Ctrl+Shift+L)
- Column selection mode (Alt+Shift+drag)
- Multi-cursor paste handling
12. Search & Replace Improvements
- Regex search highlighting
- Search history (up/down in search prompt)
- Replace preview before applying
- Search in selection
- Case-sensitive toggle (Alt+C in search)
13. File Explorer Enhancement
- File icons based on type
- Create/delete/rename files from tree
- Drag and drop support (if terminal supports)
- Git status indicators in tree
- Filter/search in tree view
14. Split Pane Features
- Synchronized scrolling option
- Diff view between panes
- Quick pane switching (Ctrl+1/2/3)
- Save pane layouts
- Terminal pane support
15. Snippet System
- Parse VSCode snippet format
- Tab stops and placeholders
- Choice elements
- Variable substitution
- Custom snippet definitions
🎨 UI/UX Enhancements
16. Theme System
- Load VSCode themes (JSON format)
- Theme hot-reload
- Separate UI and syntax themes
- High contrast mode
- Theme picker interface
17. Status Bar Enhancements
- Clickable status bar items (if terminal supports)
- LSP server status indicator
- Git branch and status
- Encoding and line ending display
- Language mode selector
18. Command Palette (Ctrl+Shift+P)
- Fuzzy command search
- Recent commands
- Command shortcuts display
- Extension commands
- Settings commands
19. Settings UI
- JSON settings file (~/.fac/settings.json)
- Settings editor interface
- Search settings
- Workspace-specific settings
- Settings sync
20. Welcome Screen
- Recent files/projects
- Quick actions (New, Open, Clone)
- Tips and tutorials
- Extension recommendations
- News/updates section
🚀 Performance & Architecture
21. Performance Optimizations
- Lazy loading for large files
- Virtual scrolling for long documents
- Syntax highlighting caching
- Incremental rendering
- Background file indexing
22. Extension System
- Plugin API definition
- Lua/Python plugin support
- Extension marketplace integration
- Extension settings
- Extension commands
23. Testing Infrastructure
- Automated UI testing with expect
- Performance benchmarks
- LSP mock server for testing
- Regression test suite
- Code coverage reporting
24. Project Management
- Project-wide search
- Project settings (.fac/project.json)
- Build task integration
- Debug adapter protocol
- Source control integration
25. Documentation
- In-editor help system (F1)
- Interactive tutorial mode
- Keyboard shortcut cheatsheet
- API documentation for extensions
- Video tutorials
📊 Priority Order
Phase 1: Core LSP 🚀 (98% Complete!)
- ✅ Diagnostics Display (100%)
- ✅ Real-time Updates (didChange/didSave) (90%)
- ✅ Go to Definition (F12) (80%)
- ✅ Find References (Shift+F12) (100%)
Phase 2: Essential IDE Features ✅ (100% Complete!)
- ✅ Code Actions & Quick Fixes (Ctrl+.)
- ✅ Document Symbols Outline (Ctrl+Shift+O)
- ✅ Signature Help (auto-trigger)
- ✅ Rename Symbol (F2)
Phase 3: Editor Polish (In Progress)
- ✅ Command Palette (Ctrl+Shift+P)
- ✅ Multiple Cursors Enhancement (Ctrl+D) - Already complete!
- ✅ Search & Replace Improvements (100% Complete!)
- ✅ Regex, case-sensitive, whole word toggles
- ✅ Replace one/all, match counter
- ✅ Search history (up/down arrows)
- ✅ Highlight all matches in viewport
- ✅ Search in selection
- ✅ Document Formatting (Shift+Alt+F)
Phase 3: Completed! ✅
- ✅ Workspace Symbols (Ctrl+Shift+T) - Fuzzy search all symbols across entire project
- 🔜 Split Pane Enhancements - Synchronized scrolling, diff view (Moved to trunk)
- 🔜 Snippet System - Code templates with tab stops (Consider separate branch)
Phase 4: Advanced Features
- Snippet System
- Theme System
- Extension System
- Project Management
Phase 5: Professional Features
- Workspace Symbols
- Split Pane Features
- Settings UI
- Debug Adapter Protocol
🎯 Success Metrics
- All LSP features working with at least 3 language servers
- Performance: <100ms response time for all operations
- Memory usage: <50MB for typical usage
- Test coverage: >80% for core modules
- Documentation: Complete for all user-facing features
📚 Documentation
Complete LSP documentation now available!
-
LSP_GUIDE.md - Comprehensive guide to all LSP features
- What is LSP and why use it?
- How to install and configure language servers
- Detailed explanation of every LSP feature
- Language-specific setup (Python, JavaScript, Rust, Fortran, Go, C/C++, etc.)
- Troubleshooting common issues
- Tips and tricks for power users
-
KEYBINDINGS.md - Complete keyboard shortcuts reference
- All LSP keybindings
- File operations, editing, navigation
- Search/replace, tabs/windows
- Panel navigation and special modes
- Quick reference for most useful combos
📝 Notes
- Each target should include tests and documentation
- Maintain backward compatibility where possible
- Keep terminal compatibility (no GUI dependencies)
- Prioritize user experience and responsiveness
- Consider accessibility (screen reader support)
View source
| 1 | # fac Editor Enhancement Targets |
| 2 | |
| 3 | ## 🎯 LSP Enhancements |
| 4 | |
| 5 | ### 1. Diagnostics Display ✅ (100% Complete!) |
| 6 | - [x] Parse textDocument/publishDiagnostics notifications |
| 7 | - [x] Store diagnostics per file in editor state |
| 8 | - [x] Display error/warning markers in the gutter |
| 9 | - [x] Show diagnostic messages in status line when cursor on error line |
| 10 | - [x] Add diagnostic severity colors (error=red, warning=yellow, info=blue) |
| 11 | - [x] Create diagnostics panel (Ctrl+Shift+D) to list all issues |
| 12 | |
| 13 | ### 2. Real-time Updates (didChange) ✅ (90% Complete!) |
| 14 | - [x] Send textDocument/didChange notifications on buffer edits |
| 15 | - [x] Document sync module with version tracking |
| 16 | - [x] Debounce changes to avoid overwhelming the server (500ms delay) |
| 17 | - [x] Send textDocument/didSave notifications on file save (Ctrl+S) |
| 18 | - [x] Integration with buffer change tracking |
| 19 | - [ ] Update diagnostics in real-time as user types (server-dependent) |
| 20 | - [ ] Implement incremental sync (send only changed portions) |
| 21 | |
| 22 | ### 3. Go to Definition ✅ (80% Complete!) |
| 23 | - [x] Implement textDocument/definition request |
| 24 | - [x] Parse LocationLink/Location responses |
| 25 | - [x] Jump to definition location (same file) |
| 26 | - [x] Add jump stack to return to previous location (Alt+,) |
| 27 | - [x] F12 keybinding for go to definition |
| 28 | - [ ] Jump to definition in different file (needs tab opening) |
| 29 | - [ ] Show preview of definition in tooltip if same file |
| 30 | |
| 31 | ### 4. Find References (Shift+F12) ✅ (100% Complete!) |
| 32 | - [x] Implement textDocument/references request |
| 33 | - [x] Create references panel showing all occurrences |
| 34 | - [x] Navigate through references with arrow keys |
| 35 | - [x] Show references with line/column information |
| 36 | - [x] Parse and populate references from LSP response with callback integration |
| 37 | - [x] Jump to selected reference with Enter key |
| 38 | - [ ] Load preview context for each reference (enhancement) |
| 39 | - [ ] Group references by file (enhancement) |
| 40 | |
| 41 | ### 5. Code Actions & Quick Fixes |
| 42 | - [ ] Request code actions at cursor position |
| 43 | - [ ] Display available actions in popup menu |
| 44 | - [ ] Apply workspace edits from code actions |
| 45 | - [ ] Support quick fixes for diagnostics |
| 46 | - [ ] Add keyboard shortcut (Ctrl+.) |
| 47 | |
| 48 | ### 6. Rename Symbol (F2) |
| 49 | - [ ] Implement textDocument/rename request |
| 50 | - [ ] Show rename prompt with current symbol name |
| 51 | - [ ] Apply workspace-wide rename edits |
| 52 | - [ ] Preview changes before applying |
| 53 | - [ ] Handle rename validation |
| 54 | |
| 55 | ### 7. Document Symbols Outline (Ctrl+Shift+O) |
| 56 | - [ ] Implement textDocument/documentSymbol request |
| 57 | - [ ] Create outline panel showing document structure |
| 58 | - [ ] Support hierarchical symbol tree |
| 59 | - [ ] Navigate to symbol on selection |
| 60 | - [ ] Show symbol kinds with icons/labels |
| 61 | |
| 62 | ### 8. Signature Help |
| 63 | - [ ] Trigger on '(' and ',' characters |
| 64 | - [ ] Show function signature tooltip |
| 65 | - [ ] Highlight current parameter |
| 66 | - [ ] Handle overloaded functions |
| 67 | - [ ] Auto-dismiss when cursor moves away |
| 68 | |
| 69 | ### 9. Document Formatting |
| 70 | - [ ] Implement textDocument/formatting request |
| 71 | - [ ] Add format document command (Shift+Alt+F) |
| 72 | - [ ] Support range formatting for selections |
| 73 | - [ ] Handle format-on-save option |
| 74 | - [ ] Respect .editorconfig settings |
| 75 | |
| 76 | ### 10. Workspace Symbols (Ctrl+T) |
| 77 | - [ ] Implement workspace/symbol request |
| 78 | - [ ] Create fuzzy search interface |
| 79 | - [ ] Show symbol kind and location |
| 80 | - [ ] Navigate to selected symbol |
| 81 | - [ ] Support incremental search |
| 82 | |
| 83 | ## 🔧 Editor Core Improvements |
| 84 | |
| 85 | ### 11. Multiple Cursors Enhancement |
| 86 | - [ ] Add cursor at next occurrence (Ctrl+D) |
| 87 | - [ ] Add cursors above/below (Ctrl+Alt+Up/Down) |
| 88 | - [ ] Select all occurrences (Ctrl+Shift+L) |
| 89 | - [ ] Column selection mode (Alt+Shift+drag) |
| 90 | - [ ] Multi-cursor paste handling |
| 91 | |
| 92 | ### 12. Search & Replace Improvements |
| 93 | - [ ] Regex search highlighting |
| 94 | - [ ] Search history (up/down in search prompt) |
| 95 | - [ ] Replace preview before applying |
| 96 | - [ ] Search in selection |
| 97 | - [ ] Case-sensitive toggle (Alt+C in search) |
| 98 | |
| 99 | ### 13. File Explorer Enhancement |
| 100 | - [ ] File icons based on type |
| 101 | - [ ] Create/delete/rename files from tree |
| 102 | - [ ] Drag and drop support (if terminal supports) |
| 103 | - [ ] Git status indicators in tree |
| 104 | - [ ] Filter/search in tree view |
| 105 | |
| 106 | ### 14. Split Pane Features |
| 107 | - [ ] Synchronized scrolling option |
| 108 | - [ ] Diff view between panes |
| 109 | - [ ] Quick pane switching (Ctrl+1/2/3) |
| 110 | - [ ] Save pane layouts |
| 111 | - [ ] Terminal pane support |
| 112 | |
| 113 | ### 15. Snippet System |
| 114 | - [ ] Parse VSCode snippet format |
| 115 | - [ ] Tab stops and placeholders |
| 116 | - [ ] Choice elements |
| 117 | - [ ] Variable substitution |
| 118 | - [ ] Custom snippet definitions |
| 119 | |
| 120 | ## 🎨 UI/UX Enhancements |
| 121 | |
| 122 | ### 16. Theme System |
| 123 | - [ ] Load VSCode themes (JSON format) |
| 124 | - [ ] Theme hot-reload |
| 125 | - [ ] Separate UI and syntax themes |
| 126 | - [ ] High contrast mode |
| 127 | - [ ] Theme picker interface |
| 128 | |
| 129 | ### 17. Status Bar Enhancements |
| 130 | - [ ] Clickable status bar items (if terminal supports) |
| 131 | - [ ] LSP server status indicator |
| 132 | - [ ] Git branch and status |
| 133 | - [ ] Encoding and line ending display |
| 134 | - [ ] Language mode selector |
| 135 | |
| 136 | ### 18. Command Palette (Ctrl+Shift+P) |
| 137 | - [ ] Fuzzy command search |
| 138 | - [ ] Recent commands |
| 139 | - [ ] Command shortcuts display |
| 140 | - [ ] Extension commands |
| 141 | - [ ] Settings commands |
| 142 | |
| 143 | ### 19. Settings UI |
| 144 | - [ ] JSON settings file (~/.fac/settings.json) |
| 145 | - [ ] Settings editor interface |
| 146 | - [ ] Search settings |
| 147 | - [ ] Workspace-specific settings |
| 148 | - [ ] Settings sync |
| 149 | |
| 150 | ### 20. Welcome Screen |
| 151 | - [ ] Recent files/projects |
| 152 | - [ ] Quick actions (New, Open, Clone) |
| 153 | - [ ] Tips and tutorials |
| 154 | - [ ] Extension recommendations |
| 155 | - [ ] News/updates section |
| 156 | |
| 157 | ## 🚀 Performance & Architecture |
| 158 | |
| 159 | ### 21. Performance Optimizations |
| 160 | - [ ] Lazy loading for large files |
| 161 | - [ ] Virtual scrolling for long documents |
| 162 | - [ ] Syntax highlighting caching |
| 163 | - [ ] Incremental rendering |
| 164 | - [ ] Background file indexing |
| 165 | |
| 166 | ### 22. Extension System |
| 167 | - [ ] Plugin API definition |
| 168 | - [ ] Lua/Python plugin support |
| 169 | - [ ] Extension marketplace integration |
| 170 | - [ ] Extension settings |
| 171 | - [ ] Extension commands |
| 172 | |
| 173 | ### 23. Testing Infrastructure |
| 174 | - [ ] Automated UI testing with expect |
| 175 | - [ ] Performance benchmarks |
| 176 | - [ ] LSP mock server for testing |
| 177 | - [ ] Regression test suite |
| 178 | - [ ] Code coverage reporting |
| 179 | |
| 180 | ### 24. Project Management |
| 181 | - [ ] Project-wide search |
| 182 | - [ ] Project settings (.fac/project.json) |
| 183 | - [ ] Build task integration |
| 184 | - [ ] Debug adapter protocol |
| 185 | - [ ] Source control integration |
| 186 | |
| 187 | ### 25. Documentation |
| 188 | - [ ] In-editor help system (F1) |
| 189 | - [ ] Interactive tutorial mode |
| 190 | - [ ] Keyboard shortcut cheatsheet |
| 191 | - [ ] API documentation for extensions |
| 192 | - [ ] Video tutorials |
| 193 | |
| 194 | ## 📊 Priority Order |
| 195 | |
| 196 | ### Phase 1: Core LSP 🚀 (98% Complete!) |
| 197 | 1. ✅ Diagnostics Display (100%) |
| 198 | 2. ✅ Real-time Updates (didChange/didSave) (90%) |
| 199 | 3. ✅ Go to Definition (F12) (80%) |
| 200 | 4. ✅ Find References (Shift+F12) (100%) |
| 201 | |
| 202 | ### Phase 2: Essential IDE Features ✅ (100% Complete!) |
| 203 | 5. ✅ Code Actions & Quick Fixes (Ctrl+.) |
| 204 | 6. ✅ Document Symbols Outline (Ctrl+Shift+O) |
| 205 | 7. ✅ Signature Help (auto-trigger) |
| 206 | 8. ✅ Rename Symbol (F2) |
| 207 | |
| 208 | ### Phase 3: Editor Polish (In Progress) |
| 209 | 9. ✅ Command Palette (Ctrl+Shift+P) |
| 210 | 10. ✅ Multiple Cursors Enhancement (Ctrl+D) - Already complete! |
| 211 | 11. ✅ Search & Replace Improvements (100% Complete!) |
| 212 | - ✅ Regex, case-sensitive, whole word toggles |
| 213 | - ✅ Replace one/all, match counter |
| 214 | - ✅ Search history (up/down arrows) |
| 215 | - ✅ Highlight all matches in viewport |
| 216 | - ✅ Search in selection |
| 217 | 12. ✅ Document Formatting (Shift+Alt+F) |
| 218 | |
| 219 | ### Phase 3: Completed! ✅ |
| 220 | 13. ✅ Workspace Symbols (Ctrl+Shift+T) - Fuzzy search all symbols across entire project |
| 221 | 14. 🔜 Split Pane Enhancements - Synchronized scrolling, diff view (Moved to trunk) |
| 222 | 15. 🔜 Snippet System - Code templates with tab stops (Consider separate branch) |
| 223 | |
| 224 | ### Phase 4: Advanced Features |
| 225 | 13. Snippet System |
| 226 | 14. Theme System |
| 227 | 15. Extension System |
| 228 | 16. Project Management |
| 229 | |
| 230 | ### Phase 5: Professional Features |
| 231 | 17. Workspace Symbols |
| 232 | 18. Split Pane Features |
| 233 | 19. Settings UI |
| 234 | 20. Debug Adapter Protocol |
| 235 | |
| 236 | ## 🎯 Success Metrics |
| 237 | |
| 238 | - [ ] All LSP features working with at least 3 language servers |
| 239 | - [ ] Performance: <100ms response time for all operations |
| 240 | - [ ] Memory usage: <50MB for typical usage |
| 241 | - [ ] Test coverage: >80% for core modules |
| 242 | - [ ] Documentation: Complete for all user-facing features |
| 243 | |
| 244 | ## 📚 Documentation |
| 245 | |
| 246 | **Complete LSP documentation now available!** |
| 247 | |
| 248 | - **[LSP_GUIDE.md](docs/LSP_GUIDE.md)** - Comprehensive guide to all LSP features |
| 249 | - What is LSP and why use it? |
| 250 | - How to install and configure language servers |
| 251 | - Detailed explanation of every LSP feature |
| 252 | - Language-specific setup (Python, JavaScript, Rust, Fortran, Go, C/C++, etc.) |
| 253 | - Troubleshooting common issues |
| 254 | - Tips and tricks for power users |
| 255 | |
| 256 | - **[KEYBINDINGS.md](docs/KEYBINDINGS.md)** - Complete keyboard shortcuts reference |
| 257 | - All LSP keybindings |
| 258 | - File operations, editing, navigation |
| 259 | - Search/replace, tabs/windows |
| 260 | - Panel navigation and special modes |
| 261 | - Quick reference for most useful combos |
| 262 | |
| 263 | ## 📝 Notes |
| 264 | |
| 265 | - Each target should include tests and documentation |
| 266 | - Maintain backward compatibility where possible |
| 267 | - Keep terminal compatibility (no GUI dependencies) |
| 268 | - Prioritize user experience and responsiveness |
| 269 | - Consider accessibility (screen reader support) |