Web editor (CM6) lacks language support for 1C:Enterprise (BSL) — ready-to-bundle package available #197271
Replies: 1 comment
-
|
Thank you for your interest in contributing to our community! We currently only accept discussions created through the GitHub UI using our provided discussion templates. Please re-submit your discussion by navigating to the appropriate category and using the template provided. This discussion has been closed because it was not submitted through the expected format. If you believe this was a mistake, please reach out to the maintainers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The in-page file editor (
<repo>/edit/<branch>/<file>) on github.com is built on CodeMirror 6 (verified via DOM:cm-editor,cm-scroller,cm-content,cm-line,cm-announced,aria-labelledby="codemirror-label"— all CM6-specific class conventions, CM5 uses CapitalCaseCodeMirror-*). It bundles a curated set of language extensions but does not currently support 1C:Enterprise (BSL) / OneScript (file extensions.bsl,.os).Status today
<repo>/blob/...) highlights BSL correctly viagithub-linguist/linguist→vendor/grammars/vsc-language-1c-bsl(TextMate) →github/treelights✓<repo>/edit/...) on the same file shows plain monochrome text, since the CM6 bundle has no BSL language extension loaded.Reach
GitHub Code Search for
lang:1C+Enterprisereturns 2.6M+ files across many thousand repositories (corporate ERP/CRM forks, OneScript open-source tooling, community projects). All of them lose syntax highlighting the moment a contributor clicks the pencil icon.What's available
We've just published a production-ready CM6 language extension that you can bundle directly:
@1c-syntax/codemirror-lang-bslon npmv0.3.1npm view @1c-syntax/codemirror-lang-bsl provenance@codemirror/language,@lezer/{common,highlight,lr}(no runtime weight beyond what your bundle already ships).bsl/.osfiles we sampled from1c-syntax/bsl-language-serverand1c-syntax/vsc-language-1c-bsltest fixtures. The handful of files the parser doesn't accept are 100% by-design malformed — intentional*ParseError*regression inputs or source-level typos (e.g.Неопределенноinstead ofНеопределено,Функция Имяwritten without parentheses). Zero hard failures (no thrown exceptions).#Если/#Область/#Использовать/#Удаление/#Вставка, regions, doc-comments, multi-line strings, date literals, async/await, labels) and an embedded SDBL query language overlay inside string literals (statement keywords, metadata-object paths, virtual-table suffixes, parameters,{...}data-composition blocks)1c-syntaxorg, which already maintains the TextMate grammar Linguist uses, the BSL language server, and the ANTLR parserIntegration shape
Asks
<repo>/edit/...?1c-syntaxorg has the bandwidth to keep the grammar in sync with the language as it evolves.Happy to answer technical questions, share benchmark data, or help with the bundling step.
Beta Was this translation helpful? Give feedback.
All reactions