Skip to content

Auto-detect: map .bsl/.os to the bsl grammar - #11

Open
sonnix-msk wants to merge 1 commit into
Thorium:masterfrom
sonnix-msk:sonnix/bsl-detect
Open

sonnix-msk wants to merge 1 commit into
Thorium:masterfrom
sonnix-msk:sonnix/bsl-detect

Conversation

@sonnix-msk

Copy link
Copy Markdown

References #7.

Adds .bsl and .os to the extension map so a 1C:Enterprise / OneScript file activates the treesitter.bsl lexer on open / buffer-activate.

The grammar is the maintained alkoleft/tree-sitter-bsl (lexer name bsl); it installs fine into TreeSitterGrammars and, with the mapping in place, already-open .bsl buffers are highlighted as soon as they are activated instead of needing a manual language pick.

No effect for users without the grammar: when it is not installed, detection simply reports the mapped grammar as unavailable, exactly as for any other unmapped-but-known extension.

sonnix-msk pushed a commit to sonnix-msk/NppTreeSitter that referenced this pull request Nov 16, 2026
…rium#11

The fork runs expired without maintainer approval (no jobs were ever created), so the same msbuild/grammars/package steps were executed locally: 12/12 DLL builds pass, 59/59 and 58/58 grammar builds pass, 6/6 packages produced. ARM64 cannot be verified on this host (no ARM64 MSVC toolchain).
@sonnix-msk

sonnix-msk commented Nov 16, 2026 •

Copy link
Copy Markdown
Author

The run says "This workflow run required approval but was not approved before it expired." GitHub requires a maintainer to approve workflow runs opened from a fork; this one was created on 2026-10-16 and expired 30 days later without approval. No jobs and no logs exist for it (/actions/runs/38892490107/jobs returns total_count: 0), so it compiled and tested nothing about this change.

To have something reviewable, I reproduced the workflow steps locally - the same msbuild Debug/Release invocations, grammars\build-grammars.ps1 and package-release.ps1:

msbuild Debug   x64 : exit 0    msbuild Release x64   : exit 0
msbuild Debug Win32 : exit 0    msbuild Release Win32 : exit 0
grammars x64        : 59 built, 0 failed, 0 skipped
grammars Win32      : 58 built, 0 failed, 1 skipped (flow - skipped by the script itself, documented x86 ICE)
package x64         : exit 0, 9 531 171 bytes, 212 entries
package Win32       : exit 0, 9 393 605 bytes, 207 entries

0 errors across all of it; the only warning is a pre-existing C4018 inside the vendored external/tree-sitter runtime, not in this diff.

Environment and exact commands: https://github.com/sonnix-msk/NppTreeSitter/blob/sonnix/personal/docs/CI-LOCAL.md

Could you hit Approve and run on the workflow so the real matrix runs before review? The one leg I cannot cover is ARM64 - this machine has no ARM64 MSVC toolchain (MSB8020), while windows-latest ships it. These diffs contain no architecture-specific code (src/dllmain.cpp, +3 lines).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant