ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Henri Menke via ntg-context <ntg-context@ntg.nl>
To: ntg-context@ntg.nl
Cc: Henri Menke <henri@henrimenke.de>
Subject: Re: Syntax highlighting using LMTX
Date: Thu, 02 Dec 2021 19:35:35 +0100	[thread overview]
Message-ID: <0eb8cb81534a50aee25c5fc69e0f5abf739dd942.camel@henrimenke.de> (raw)
In-Reply-To: <nycvar.YAK.7.78.908.2112021155440.2024218@nqv-guvaxcnq>

On Thu, 2021-12-02 at 12:07 -0500, Aditya Mahajan via ntg-context
wrote:
> On Thu, 2 Dec 2021, Thangalin via ntg-context wrote:
> 
> > Hi all,
> > 
> > There are a few technical hurdles with using the t-vim module in
> > LMTX.
> > First, users need to install the module using externally defined
> > shell
> > scripts. Second, it's awkward to communicate to users how to install
> > it,
> > especially for Windows users. Third, it likely requires installing
> > vim, as
> > a separate step. Fourth, making general-purpose XML setups that
> > optionally
> > rely on syntax highlighting when it is an optional install is a
> > little
> > laborious.
> > 
> > If installing a module was as easy as "install.sh --module=t-vim"
> > then that
> > would leap over most hurdles. 
> 
> You can always install manually as follows:
> 
> cd $TEXMFHOME
> wget
> https://mirrors.ctan.org/macros/context/contrib/context-{filter,vim}.zip
> unzip context-{filter,vim}.zip
> 
> > Although there'd still be a dependency on installing vim. 
> 
> Yes, that's a trade-off that the vim module makes. But, last time I
> used Windows (some 10 years ago), installing vim was relatively easy.
> Download the install from vim's website, and click next a couple of
> times. 
> 
> > How would you go about creating a syntax highlighter for Java that
> > can work
> > with LMTX? 
> 
> I'll let others answer that. Had I known that, I wouldn't have written
> a module to do syntax highlighting :-) In the end, it also depends on
> how refined a syntax highlighter you want. Writing a simple keyword
> based highlighter is relatively easy. See, for example, scite-context-
> lexer-cpp.lua in the distribution, which is based on the CPP lexer in
> scite.

I wrote an answer here some time ago.
https://tex.stackexchange.com/questions/333508/custom-pretty-printer-in-context

Cheers, Henri

> 
> Aditya
> _______________________________________________________________________
> ____________
> If your question is of interest to others as well, please add an entry
> to the Wiki!
> 
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> _______________________________________________________________________
> ____________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2021-12-02 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  8:45 Thangalin via ntg-context
2021-12-02 17:07 ` Aditya Mahajan via ntg-context
2021-12-02 18:35   ` Henri Menke via ntg-context [this message]
2021-12-15 12:18     ` Christoph Reller 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=0eb8cb81534a50aee25c5fc69e0f5abf739dd942.camel@henrimenke.de \
    --to=ntg-context@ntg.nl \
    --cc=henri@henrimenke.de \
    /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).