Feature Request: Context-Aware Code Completion Delays
Current Behavior
When writing comments in code, Cursor provides immediate code completion suggestions that:
- Often mispredict my intentions while writing comments
- Are visually distracting while trying to write clear documentation
- Frequently need to be dismissed or ignored
Proposed Behavior
Implement context-aware completion delays that:
- Disable immediate code completions while writing comments (lines starting with //, /*, or *)
- Maintain delayed spelling/grammar suggestions for comments after a brief pause in typing
- Keep the current immediate completion behavior for actual code
Benefits
- Improved comment writing experience with less visual noise
- Better focus on writing clear documentation
- Maintains helpful spelling/grammar suggestions for comments
- Preserves the existing powerful code completion features for actual code
Technical Considerations
- Could be implemented by detecting comment context through:
- Line prefix detection (//, /*, *)
- File type awareness
- Cursor position relative to comment markers
- Could use existing completion delay mechanisms, just with context-specific timing
- Could be configurable through settings.json
User Experience
- Users writing comments would see a cleaner interface without irrelevant code suggestions
- After a brief pause in typing, they’d still get helpful spelling/grammar suggestions
- The transition between code and comments would be seamless
- No configuration needed by default, but options available for power users
Related Issues
- None found in current issue tracker
- Similar to general completion control requests but with specific focus on comment context