Skip to content

blob: Add experimental support for rendering files with CodeMirror

Warren Gifford requested to merge fkling/codemirror-blob into main

Created by: fkling

This commit introduces a file view backed by CodeMirror. It shows the file as plain text without syntax highlighting. I spent a little bit of time to implement a line gutter that supports line (range) selection.

To use the CodeMirror version experimentalFeatures.enableCodeMirrorFileView needs to be set to true.

Note that this is a rough minimal drop in replacement and the way things are implemented might not be optimal.

https://user-images.githubusercontent.com/179026/179315917-6e9072ef-8b52-4f4a-b328-ec1e23e1addd.mp4

Test plan

  • Navigate to file: Shows current blob view
  • Enable feature flag (enableCodemirrorFileView), navigate to file: Shows CodeMirror based file view

Merge request reports

Loading