Nicolas Martyanoff on Nostr: Designing and implementing a new language for configuration files is one thing, but ...
Designing and implementing a new language for configuration files is one thing, but there is no way I'm using it without an Emacs mode. So I wrote one!
That was not easy. Inheriting from prog-mode helps a lot of course. Then defining a syntax table, and suddenly font-lock magically highlights comments and character strings. Indentation (indent-line-function) was painful, but I got it working for the canonical representation (no inline blocks, sorry not sorry).
https://github.com/galdor/bcl-modePublished at
2024-12-24 15:51:44Event JSON
{
"id": "13d237ba1f65efa4aec899521f6a66909e7c16cf335b370671bd2b097b7f3dfb",
"pubkey": "6d91e7b056ab18986298e04a8b278a5e070a726487fd30a599427c79db9070e9",
"created_at": 1735055504,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/users/galdor/statuses/113708597532574068",
"activitypub"
]
],
"content": "Designing and implementing a new language for configuration files is one thing, but there is no way I'm using it without an Emacs mode. So I wrote one!\n\nThat was not easy. Inheriting from prog-mode helps a lot of course. Then defining a syntax table, and suddenly font-lock magically highlights comments and character strings. Indentation (indent-line-function) was painful, but I got it working for the canonical representation (no inline blocks, sorry not sorry).\n\nhttps://github.com/galdor/bcl-mode",
"sig": "9a48f8b86f15ec7686c7a92126d005bd08b99f01988fe29aca7b784e8f41642af6d36f2049e3272c64c21dab1e9d903ee690a1aafd022b9314184844f8d5de23"
}