@1c-syntax/codemirror-lang-bsl
    Preparing search index...

    Function bsl

    • BSL language extension for CodeMirror 6.

      Returns a LanguageSupport bundling bslLanguage (with its embedded SDBL overlay) ready to drop into an EditorState's extensions array. This is the canonical entry point — 99% of consumers should call this and nothing else.

      Highlighting of an embedded query inside a string literal turns on automatically: any string starting with ВЫБРАТЬ/SELECT/УНИЧТОЖИТЬ/ DROP (case-insensitive, after stripping leading | continuations) gets parsed by the SDBL grammar and rendered with SDBL-specific highlight tags. No configuration required.

      Returns LanguageSupport

      A LanguageSupport instance ready to be passed to EditorState.create({extensions: [..., bsl()]}).

      import {EditorView, basicSetup} from "codemirror"
      import {bsl} from "@1c-syntax/codemirror-lang-bsl"

      new EditorView({
      doc: 'Запрос.Текст = "ВЫБРАТЬ * ИЗ Справочник.Контрагенты";',
      extensions: [basicSetup, bsl()],
      parent: document.body
      })