Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

codemirror-wrapped-line-indent

fauzi9331416kMIT1.0.9TypeScript support: included

A plugin for CodeMirror to handle wrapped line indentation

codemirror, wrapped, indent

readme

Wrapped Line Indentation for CodeMirror

An extension for CodeMirror that adds indentation for wrapped lines.

Installation

Using npm:

npm install codemirror-wrapped-line-indent

Usage

import { EditorState } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { wrappedLineIndent } from 'codemirror-wrapped-line-indent';

// ... your CodeMirror setup code ...

const state = EditorState.create({
  // ... other state options ...
  extensions: [
    EditorView.lineWrapping,
    wrappedLineIndent
  ]
});

const view = new EditorView({ state });

License

MIT