Nerds Publishing Monstrosities

    codemirror-line-numbers-relative
    TypeScript icon, indicating that this package has built-in type declarations

    0.19.3-beta.4 • Public • Published

    Relative Line Numbers for CM6

    Installation

    yarn add codemirror-line-numbers-relative

    Usage

    Edit cm6-relative-line-numbers-ts (with package)

    import { EditorView } from "@codemirror/view";
    import { EditorState } from "@codemirror/state";
    import { lineNumbersRelative } from "codemirror-line-numbers-relative";
    
    new EditorView({
      state: EditorState.create({
        doc: `hello world!
    who doesn't love relative line numbers?`,
        extensions: [lineNumbersRelative()],
      }),
      parent: document.querySelector("#editor"),
    });

    Credit

    This wouldn't be possible these resources:

    Install

    npm i codemirror-line-numbers-relative

    DownloadsWeekly Downloads

    13

    Version

    0.19.3-beta.4

    License

    MIT

    Unpacked Size

    7.96 kB

    Total Files

    7

    Last publish

    Collaborators

    • jsjoeio