Skip to content

Proposal: Migration to CodeMirror 6 editor #1002

Closed
@bummoblizard

Description

@bummoblizard

Background

Code App uses Monaco Editor as its core text editor. It is feature-rich and compatible with VS Code features that our users are familiar with. However, its mobile unfriendliness makes the app incredibly difficult to use for users without access to a physical keyboard:

Altenative

CodeMirror 6 is a performant and mobile-friendly editor alternative to Monaco. All native iOS text selection gestures are supported properly.

Left: Monaco with TextMate; Right: CM6
image

TODOs:

Identify the missing features and lay out a plan for development and integration:

  • Styling and touch controls of mini-map (https://github.com/replit/codemirror-minimap)
  • Line number styling
  • Custom search widget
  • State restoration
  • Gutter area and diff algorithm for Git decorations
  • Theme converter (Textmate -> CM6)
  • Language definitions (Challenging, is it possible to convert or use text mate definitions directly?)
  • Diff editor
  • VIM (https://github.com/replit/codemirror-vim)
  • URL detections
  • APIs for interacting with the editor:
    • Callbacks on editor state update (e.g. content / cursor changed)
    • Storage for multiple editors
  • Rethink the APIs used to interact with Native code / SwiftUI
  • etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions