textmate-bjolang: code highlighted as VS Code does, as Bjolang values
TextMateSharp runs VS Code's TextMate grammars and themes; this hands
the result over once, as Bjolang values, so nothing using it needs to
know TextMateSharp is there. `tokenize` gives each line's tokens and
their scopes, `highlight` each line's spans in the theme's colours, and
`highlight->node` and `code->node` give (text xml) nodes: a pre and a
code element around spans, coloured inline by the theme or by class
names taken from the scopes. `highlighter-css` writes the stylesheet
for the classes from a theme, choosing each class's rule the way
TextMateSharp's tokenizer chooses a token's.
Bjolang's own grammar is in grammars/bjolang, laid out as a VS Code
extension, and every highlighter reads it from beside the package's
src/. It follows what Bjolang's reader reads, including interpolated
strings with expressions in their holes.
There is no C# shim: everything goes through import/class and
import/extern. The package is kept within TextMateSharp 2.0, because
token colours are decoded with a class in its Internal namespace.
🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-4-7)
Co-Authored-By: eca-agent <git@eca.dev>
2026-09-30 15:51:24 +02:00
|
|
|
(package
|
|
|
|
|
(name (textmate-bjolang))
|
2026-10-17 17:59:22 +02:00
|
|
|
(version "0.2.0")
|
textmate-bjolang: code highlighted as VS Code does, as Bjolang values
TextMateSharp runs VS Code's TextMate grammars and themes; this hands
the result over once, as Bjolang values, so nothing using it needs to
know TextMateSharp is there. `tokenize` gives each line's tokens and
their scopes, `highlight` each line's spans in the theme's colours, and
`highlight->node` and `code->node` give (text xml) nodes: a pre and a
code element around spans, coloured inline by the theme or by class
names taken from the scopes. `highlighter-css` writes the stylesheet
for the classes from a theme, choosing each class's rule the way
TextMateSharp's tokenizer chooses a token's.
Bjolang's own grammar is in grammars/bjolang, laid out as a VS Code
extension, and every highlighter reads it from beside the package's
src/. It follows what Bjolang's reader reads, including interpolated
strings with expressions in their holes.
There is no C# shim: everything goes through import/class and
import/extern. The package is kept within TextMateSharp 2.0, because
token colours are decoded with a class in its Internal namespace.
🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-4-7)
Co-Authored-By: eca-agent <git@eca.dev>
2026-09-30 15:51:24 +02:00
|
|
|
(description "Syntax highlighting for Bjolang: VS Code's TextMate grammars and themes, through TextMateSharp, as (text xml) nodes.")
|
|
|
|
|
(license "MPL-2.0")
|
|
|
|
|
|
|
|
|
|
;; TextMateSharp (MIT) runs the grammars; its Grammars package carries VS
|
|
|
|
|
;; Code's grammars and themes, and pulls in Onigwrap, the Oniguruma regex
|
|
|
|
|
;; engine as a native library. Kept within 2.0: the token colours are
|
|
|
|
|
;; decoded with a class in TextMateSharp's Internal namespace, which a
|
|
|
|
|
;; minor version may change.
|
|
|
|
|
(packages
|
|
|
|
|
(nuget (id "TextMateSharp.Grammars") (version "[2.0.4,2.1)")))
|
|
|
|
|
|
2026-10-02 14:39:31 +02:00
|
|
|
;; Bjolang's own grammar, read at run time from beside src/. Declared so
|
|
|
|
|
;; that bjo publish copies it along with the module.
|
|
|
|
|
(resources "grammars")
|
|
|
|
|
|
textmate-bjolang: code highlighted as VS Code does, as Bjolang values
TextMateSharp runs VS Code's TextMate grammars and themes; this hands
the result over once, as Bjolang values, so nothing using it needs to
know TextMateSharp is there. `tokenize` gives each line's tokens and
their scopes, `highlight` each line's spans in the theme's colours, and
`highlight->node` and `code->node` give (text xml) nodes: a pre and a
code element around spans, coloured inline by the theme or by class
names taken from the scopes. `highlighter-css` writes the stylesheet
for the classes from a theme, choosing each class's rule the way
TextMateSharp's tokenizer chooses a token's.
Bjolang's own grammar is in grammars/bjolang, laid out as a VS Code
extension, and every highlighter reads it from beside the package's
src/. It follows what Bjolang's reader reads, including interpolated
strings with expressions in their holes.
There is no C# shim: everything goes through import/class and
import/extern. The package is kept within TextMateSharp 2.0, because
token colours are decoded with a class in its Internal namespace.
🤖 Generated with [ECA](https://eca.dev) (anthropic/claude-opus-4-7)
Co-Authored-By: eca-agent <git@eca.dev>
2026-09-30 15:51:24 +02:00
|
|
|
;; A library: there is no src/main.bjo.
|
|
|
|
|
)
|