Nondigestible Purple Mayonnaise

    @codemirror/legacy-modes
    TypeScript icon, indicating that this package has built-in type declarations

    6.3.1 • Public • Published

    @codemirror/legacy-modes NPM version

    [ WEBSITE | ISSUES | FORUM | CHANGELOG ]

    This package implements a collection of ported stream language modes for the CodeMirror code editor. Each mode is available as a separate script file, under "@codemirror/legacy-modes/mode/[name]", and exports the values listed below.

    The project page has more information, a number of examples and the documentation.

    This code is released under an MIT license.

    We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.

    Example

    Using modes from this package works like this:

    • Install this package and the @codemirror/language package.

    • Find the StreamParser instance you need in the reference below.

    • Add StreamLanguage.define(theParser) to your editor's configuration.

    For example, to load the Lua mode, you'd do something like...

    import {StreamLanguage} from "@codemirror/language"
    import {lua} from "@codemirror/legacy-modes/mode/lua"
    
    import {EditorView, basicSetup} from "codemirror"
    
    let view = new EditorView({
      extensions: [basicSetup, StreamLanguage.define(lua)]
    })

    API Reference

    mode/apl

    apl: StreamParser<unknown>

    mode/asciiarmor

    asciiArmor: StreamParser<unknown>

    mode/asn1

    asn1(conf: {keywords⁠?: Object<any>, cmipVerbs⁠?: Object<any>, compareTypes⁠?: Object<any>, status⁠?: Object<any>, tags⁠?: Object<any>, storage⁠?: Object<any>, modifier⁠?: Object<any>, accessTypes⁠?: Object<any>, multiLineStrings⁠?: boolean}) → StreamParser<unknown>

    mode/asterisk

    asterisk: StreamParser<unknown>

    mode/brainfuck

    brainfuck: StreamParser<unknown>

    mode/clike

    clike(conf: {statementIndentUnit⁠?: number, dontAlignCalls⁠?: boolean, keywords⁠?: Object<any>, types⁠?: Object<any>, builtin⁠?: Object<any>, blockKeywords⁠?: Object<any>, atoms⁠?: Object<any>, hooks⁠?: Object<any>, multiLineStrings⁠?: boolean, indentStatements⁠?: boolean, indentSwitch⁠?: boolean, namespaceSeparator⁠?: string, isPunctuationChar⁠?: RegExp, numberStart⁠?: RegExp, number⁠?: RegExp, isOperatorChar⁠?: RegExp, isIdentifierChar⁠?: RegExp, isReservedIdentifier⁠?: fn(idstring) → boolean}) → StreamParser<unknown>
    c: StreamParser<unknown>
    cpp: StreamParser<unknown>
    java: StreamParser<unknown>
    csharp: StreamParser<unknown>
    scala: StreamParser<unknown>
    kotlin: StreamParser<unknown>
    shader: StreamParser<unknown>
    nesC: StreamParser<unknown>
    objectiveC: StreamParser<unknown>
    objectiveCpp: StreamParser<unknown>
    squirrel: StreamParser<unknown>
    ceylon: StreamParser<unknown>
    dart: StreamParser<unknown>

    mode/clojure

    clojure: StreamParser<unknown>

    mode/cmake

    cmake: StreamParser<unknown>

    mode/cobol

    cobol: StreamParser<unknown>

    mode/coffeescript

    coffeeScript: StreamParser<unknown>

    mode/commonlisp

    commonLisp: StreamParser<unknown>

    mode/crystal

    crystal: StreamParser<unknown>

    mode/css

    css: StreamParser<unknown>
    sCSS: StreamParser<unknown>
    less: StreamParser<unknown>
    gss: StreamParser<unknown>

    mode/cypher

    cypher: StreamParser<unknown>

    mode/d

    d: StreamParser<unknown>

    mode/diff

    diff: StreamParser<unknown>

    mode/dockerfile

    dockerFile: StreamParser<unknown>

    mode/dtd

    dtd: StreamParser<unknown>

    mode/dylan

    dylan: StreamParser<unknown>

    mode/ebnf

    ebnf: StreamParser<unknown>

    mode/ecl

    ecl: StreamParser<unknown>

    mode/eiffel

    eiffel: StreamParser<unknown>

    mode/elm

    elm: StreamParser<unknown>

    mode/erlang

    erlang: StreamParser<unknown>

    mode/factor

    factor: StreamParser<unknown>

    mode/fcl

    fcl: StreamParser<unknown>

    mode/forth

    forth: StreamParser<unknown>

    mode/fortran

    fortran: StreamParser<unknown>

    mode/gas

    gas: StreamParser<unknown>
    gasArm: StreamParser<unknown>

    mode/gherkin

    gherkin: StreamParser<unknown>

    mode/go

    go: StreamParser<unknown>

    mode/groovy

    groovy: StreamParser<unknown>

    mode/haskell

    haskell: StreamParser<unknown>

    mode/haxe

    haxe: StreamParser<unknown>
    hxml: StreamParser<unknown>

    mode/http

    http: StreamParser<unknown>

    mode/idl

    idl: StreamParser<unknown>

    mode/javascript

    javascript: StreamParser<unknown>
    json: StreamParser<unknown>
    jsonld: StreamParser<unknown>
    typescript: StreamParser<unknown>

    mode/jinja2

    jinja2: StreamParser<unknown>

    mode/julia

    julia: StreamParser<unknown>

    mode/livescript

    liveScript: StreamParser<unknown>

    mode/lua

    lua: StreamParser<unknown>

    mode/mathematica

    mathematica: StreamParser<unknown>

    mode/mbox

    mbox: StreamParser<unknown>

    mode/mirc

    mirc: StreamParser<unknown>

    mode/mllike

    oCaml: StreamParser<unknown>
    fSharp: StreamParser<unknown>
    sml: StreamParser<unknown>

    mode/modelica

    modelica: StreamParser<unknown>

    mode/mscgen

    mscgen: StreamParser<unknown>
    msgenny: StreamParser<unknown>
    xu: StreamParser<unknown>

    mode/mumps

    mumps: StreamParser<unknown>

    mode/nginx

    nginx: StreamParser<unknown>

    mode/nsis

    nsis: StreamParser<unknown>

    mode/ntriples

    ntriples: StreamParser<unknown>

    mode/octave

    octave: StreamParser<unknown>

    mode/oz

    oz: StreamParser<unknown>

    mode/pascal

    pascal: StreamParser<unknown>

    mode/pegjs

    pegjs: StreamParser<unknown>

    mode/perl

    perl: StreamParser<unknown>

    mode/pig

    pig: StreamParser<unknown>

    mode/powershell

    powerShell: StreamParser<unknown>

    mode/properties

    properties: StreamParser<unknown>

    mode/protobuf

    protobuf: StreamParser<unknown>

    mode/puppet

    puppet: StreamParser<unknown>

    mode/python

    python: StreamParser<unknown>
    cython: StreamParser<unknown>

    mode/q

    q: StreamParser<unknown>

    mode/r

    r: StreamParser<unknown>

    mode/rpm

    rpmChanges: StreamParser<unknown>
    rpmSpec: StreamParser<unknown>

    mode/ruby

    ruby: StreamParser<unknown>

    mode/rust

    rust: StreamParser<unknown>

    mode/sas

    sas: StreamParser<unknown>

    mode/scheme

    scheme: StreamParser<unknown>

    mode/shell

    shell: StreamParser<unknown>

    mode/sieve

    sieve: StreamParser<unknown>

    mode/smalltalk

    smalltalk: StreamParser<unknown>

    mode/solr

    solr: StreamParser<unknown>

    mode/sparql

    sparql: StreamParser<unknown>

    mode/spreadsheet

    spreadsheet: StreamParser<unknown>

    mode/sql

    sql(conf: {client⁠?: Object<any>, atoms⁠?: Object<any>, builtin⁠?: Object<any>, keywords⁠?: Object<any>, operatorChars⁠?: RegExp, support⁠?: Object<any>, hooks⁠?: Object<any>, dateSQL⁠?: Object<any>, backslashStringEscapes⁠?: boolean, brackets⁠?: RegExp, punctuation⁠?: RegExp}) → StreamParser<unknown>
    standardSQL: StreamParser<unknown>
    msSQL: StreamParser<unknown>
    mySQL: StreamParser<unknown>
    mariaDB: StreamParser<unknown>
    sqlite: StreamParser<unknown>
    cassandra: StreamParser<unknown>
    plSQL: StreamParser<unknown>
    hive: StreamParser<unknown>
    pgSQL: StreamParser<unknown>
    gql: StreamParser<unknown>
    gpSQL: StreamParser<unknown>
    sparkSQL: StreamParser<unknown>
    esper: StreamParser<unknown>

    mode/stex

    stex: StreamParser<unknown>
    stexMath: StreamParser<unknown>

    mode/stylus

    stylus: StreamParser<unknown>

    mode/swift

    swift: StreamParser<unknown>

    mode/tcl

    tcl: StreamParser<unknown>

    mode/textile

    textile: StreamParser<unknown>

    mode/tiddlywiki

    tiddlyWiki: StreamParser<unknown>

    mode/tiki

    tiki: StreamParser<unknown>

    mode/toml

    toml: StreamParser<unknown>

    mode/troff

    troff: StreamParser<unknown>

    mode/ttcn-cfg

    ttcnCfg: StreamParser<unknown>

    mode/ttcn

    ttcn: StreamParser<unknown>

    mode/turtle

    turtle: StreamParser<unknown>

    mode/vb

    vb: StreamParser<unknown>

    mode/vbscript

    vbScript: StreamParser<unknown>
    vbScriptASP: StreamParser<unknown>

    mode/velocity

    velocity: StreamParser<unknown>

    mode/verilog

    verilog: StreamParser<unknown>
    tlv: StreamParser<unknown>

    mode/vhdl

    vhdl: StreamParser<unknown>

    mode/wast

    wast: StreamParser<unknown>

    mode/webidl

    webIDL: StreamParser<unknown>

    mode/xml

    xml: StreamParser<unknown>
    html: StreamParser<unknown>

    mode/xquery

    xQuery: StreamParser<unknown>

    mode/yacas

    yacas: StreamParser<unknown>

    mode/yaml

    yaml: StreamParser<unknown>

    mode/z80

    z80: StreamParser<unknown>
    ez80: StreamParser<unknown>

    Keywords

    Install

    npm i @codemirror/legacy-modes

    DownloadsWeekly Downloads

    84,331

    Version

    6.3.1

    License

    MIT

    Unpacked Size

    1.89 MB

    Total Files

    313

    Last publish

    Collaborators

    • adrianheine
    • marijn