codemirror-wrapped-line-indent
Version:
A plugin for CodeMirror to handle wrapped line indentation
20 lines (19 loc) • 660 B
TypeScript
import { EditorView, ViewPlugin, ViewUpdate, type DecorationSet, type PluginValue } from "@codemirror/view";
declare class WrappedLineIndent implements PluginValue {
view: EditorView;
decorations: DecorationSet;
initialPaddingLeft: string | null;
indentUnit: number;
isChrome: boolean;
constructor(view: EditorView);
update(update: ViewUpdate): void;
private generate;
private addStyleToBuilder;
private getVisibleLines;
numColumns(str: string, tabSize: number): {
numColumns: number;
containsTab: boolean;
};
}
export declare const wrappedLineIndent: ViewPlugin<WrappedLineIndent>[];
export {};