Skip to content

8.0.0: feat: Enhance semantic highlighting and identifier character support

Choose a tag to compare

@heckmon heckmon released this 02 Feb 19:28
· 144 commits to main since this release

✨ Major Features

🌍 RTL (Right-to-Left) Language Support

  • FEATURE: Added comprehensive RTL support for right-to-left languages (Arabic, Hebrew, etc.)
    • Added textDirection parameter to CodeForge widget to control text layout direction
    • Gutter automatically positions on the right side for RTL mode
    • Text rendering properly aligned for RTL languages with full visual direction support
    • Caret positioning and movement follow visual direction (not logical) for intuitive editing
    • Selection highlighting works correctly for RTL text
    • All UI elements (fold icons, line numbers, indentation guides) properly mirrored for RTL
    • Bracket pair highlighting supports RTL
    • Scroll behavior adapted for RTL layout

🔤 RTL Text Input & Navigation

  • FEATURE: Arrow keys follow visual direction for RTL
    • Left arrow visually moves left (logically moves right in RTL)
    • Right arrow visually moves right (logically moves left in RTL)
    • Home key moves to visual line start (line end in RTL)
    • End key moves to visual line end (line start in RTL)
    • Ctrl+Arrow word navigation follows visual direction for RTL
  • FEATURE: Arabic and Hebrew word detection for code completion
    • Updated word pattern matching to include Arabic (U+0600-U+06FF), Extended Arabic (U+08A0-U+08FF), and Hebrew (U+0590-U+05FF) Unicode ranges
    • LSP suggestions now work correctly for RTL languages
    • Word cache includes RTL script characters
    • Fold icons display correctly for RTL (< for folded, down arrow for unfolded)

🎯 Hover Documentation Improvements

  • ENHANCEMENT: Improved hover popup positioning and visibility
    • Hover documentation now positions above cursor if space is limited below
    • Better width constraints and viewport-aware positioning
    • Added hover content caching for improved performance
    • Hover content is fetched asynchronously without blocking rendering
    • Diagonal offset adjustment prevents hover from blocking cursor area
  • ENHANCEMENT: Hover triggered by tap on mobile/desktop now persists properly
    • Added onHoverSetByTap callback for better tap-based hover handling
    • Hover state properly managed to avoid flicker

🔧 Code Improvements & Fixes

  • FIX: Auto-indentation now only triggers on single Enter key press
    • Paste operations no longer re-indent pasted multi-line content incorrectly
    • Only the first newline in pasted text triggers auto-indent
  • FIX: CCLS semantic highlighting refresh debouncing
    • Added _scheduleCclsRefresh with 1 second debounce to avoid excessive document saves
    • CCLS servers that use custom semantic token protocol now work more reliably
  • ENHANCEMENT: Better suggestion popup positioning
    • Popup now positions above cursor when limited space below
    • Horizontal alignment adjusted to stay within viewport
    • Improved mobile responsiveness

📊 Internal Changes

  • Modified paragraph style to respect textDirection property
  • Added RTL-aware cache invalidation for paragraph building
  • Improved caret info calculation for RTL text positioning
  • Enhanced text offset to line/char conversion for RTL
  • Selection handle positioning adapted for RTL layout
  • Ghost text (AI completion) positioning corrected for RTL
  • Inlay hints and document colors properly positioned for RTL