On 2021-04-25, Hans Hagen <j.ha...@xs4all.nl> wrote:
>> If there is a way to automatically get a list of all ConTeXt commands
>> and options (and, ideally, MetaFun defs, types, and other keywords), I'd
>> be happy to improve omni-completion for ConTeXt in Vim.
> All is in xml files (i-*.xml) in the distribution maintained by
> Wolfgang. We ship with this for editors:
>
> >dir t:\texmf\context\data
>
> 04/21/2021  11:40 AM    <DIR>          scite
> 04/21/2021  11:40 AM    <DIR>          textadept
> 04/21/2021  11:40 AM    <DIR>          texworks
> 04/21/2021  11:40 AM    <DIR>          vscode
>
> these lists are generated by mtx-interface so we can add more if needed

Could you please elaborate on the (automatic?) data flow from ConTeXt's
source files to data files for each application? Is it:

source code -> XML -> .lua -> mtx-interface -> data?

In particular, it is not clear to me how i-*.xml files are related to
mtx-interface, as the latter does not use them directly, AFAICS.

Anyway, mtx-interface seems exactly what I am looking for, and I would
like to use it to generate ConTeXt keywords for Vim. Can I patch that
script?

For MetaFun keywords I don't know yet: do those XML files contain enough
information about the content of all mp-* source files? E.g., the fact
that `hlingrid` is a def? Looking at the Scite files, I see only
internals and commands, and they seem to cover only the "main" MetaFun
names.

I have used a custom script in the past for fine-grained keyword
extraction from MetaFun's source code. By fine-grained, I mean that the
output contains information about the kind of keyword (def, primary def,
vardef, constant, variable, etc.) I could update it to Lua and mp-*.mpxl
if that interests you—unless that has already been done, of course.

Nicola

___________________________________________________________________________________
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 via email to