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.

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