From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: [NTG-context] Re: context-lmtx-mode – Emacs package for editing .ctx files in ConTeXt LMTX
Date: Mon, 22 Sep 2025 09:11:07 +0200 [thread overview]
Message-ID: <afb95cbf-921a-4847-b5de-c6df232f7c15@xs4all.nl> (raw)
In-Reply-To: <175852136108.2540.17915294865500943598@cgl.ntg.nl>
On 9/22/2025 8:09 AM, seyal.zavira@gmail.com wrote:
> 2. Superior Multi-Language Highlighting (via Polymode):
> This is the core technical advantage. context-lmtx-mode uses
> polymode to correctly handle and highlight different languages
> embedded within a .ctx file. This means if you have Lua code inside
> \startluacode, Metapost code inside \startMPcode, or XML blocks,
> each snippet gets its own proper syntax highlighting and indentation.
> This is a common pain point in other editors, and I wanted to solve
> it properly.
Just for the record. The code base actually evolved in sync with the way
we highlight. This can be emulated with
\usemodule[scite]
\starttyping[option=TEX]
....
\stoptyping
This also supports nesting of mp and lua and some more (not all nesting
makes sense). It's kind of the reference for context syntax
highlighting. (We do have specific highlighters for xml, pdf, sql .. the
things i needed so to say).
The information for this is part of the context distribution, like
commands, keywords, classifications, etc. It comes in editor specific
support and in xml files that describe the commands etc. If needed
additional files can be generated (we do it for some editors with
>mtxrun --script interface) but I have no clue what data emacs needs.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2025-09-22 7:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-07 4:24 [NTG-context] " seyal.zavira
2025-09-07 5:52 ` [NTG-context] " Joaquín Ataz López
2025-09-07 14:18 ` Jim
2025-09-07 8:53 ` Henning Hraban Ramm
2025-09-07 11:09 ` Jim
2025-09-07 13:02 ` Riviera Taylor via ntg-context
2025-09-22 6:09 ` seyal.zavira
2025-09-22 7:03 ` juh+ntg-context--- via ntg-context
2025-09-22 7:11 ` Hans Hagen via ntg-context [this message]
2025-09-22 15:51 ` seyal.zavira
2025-09-22 17:52 ` juh+ntg-context--- via ntg-context
2025-09-23 0:07 ` Jim
2025-09-09 23:55 Lizardo Reyna via ntg-context
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=afb95cbf-921a-4847-b5de-c6df232f7c15@xs4all.nl \
--to=ntg-context@ntg.nl \
--cc=j.hagen@xs4all.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).