[NTG-context] (any) neovim users?

Nicola nvitacolonna at gmail.com
Fri Oct 14 20:59:24 CEST 2022


On 2022-10-14, Alan Braslau via ntg-context <ntg-context at ntg.nl> wrote:
> On Fri, 14 Oct 2022 16:48:42 -0000 (UTC)
> Nicola via ntg-context <ntg-context at ntg.nl> wrote:
>
>> On 2022-10-14, Alan Braslau via ntg-context <ntg-context at ntg.nl>
>> wrote:
>> > A recent upgrade of the editor neovim leads to the following error
>> > when using %&context identification at the head of .tex source
>> > files.
>>
>> The ConTeXt plugin (as well as MetaPost and MetaFont ones) has
>> recently been rewritten in Vim 9 script (the new scripting language
>> embedded in Vim), which NeoVim does not support, afaik. See this
>> thread: https://github.com/vim/vim/issues/10968.
>>
>> One thing you can do is: grab the old runtime files and put them in
>> you own ~/.vim directory (following a similar layout). You may get
>> those from the `runtime` folder of the Vim project:
>> https://github.com/vim/vim, or from NeoVim repo. Just checkout
>> a revision with the old scripts (searching for "update runtime" in the
>> commit logs should help you filter the relevant commits).
>>
>> Nicola
>
> Thank you,
>
> I wonder why a lua error is reported?

Sorry, I should have said that I am only *assuming* that what I wrote
may be the reason for the error. In fact, I have now tried to open
a file starting with %&context, and I get no error. This with NeoVim
v0.7.2.

> I also worry that %@context support has now diverged (for whatever
> reason) and that Context highlighting is now limited to the one "vim"
> variant of the vi editor. Using old runtime files in one's personal
> .vim directory locks one into unmaintained (by the Context community)
> syntax. I wish that a better solution were available.

I am the current maintainer of the ConTeXt/MetaPost/METAFONT plugins.
I do not use NeoVim, and maintaining a plugin compatible with both
systems would be too much of a headache (I know because I have tried
with other plugins). I think that the ConTeXt plugin was not fully
functional in NeoVim even before switch to Vim 9 script (async
typesetting was based on Vim API and, last time I checked, NeoVim had an
incompatible API).

Switching to Vim 9 script has many advantages, as Bram has explained in
the thread I have linked to. So, I believe that it is only natural that
Vim's runtime will gradually move towards Vim 9 script.

Yours is a valid concern, but maintaining (Neo)Vim plugins is
a community effort. I took over the development of the ConTeXt plugin
because I wanted to improve the support for ConTeXt in Vim, and at the
time the plugin had no active maintainer. In the same way, an
unsatisfied user might take over the development of a ConTeXt plugin for
NeoVim, or maybe even for both systems. Anyone can submit a patch, and
I would welcome a co-maintainer, or even someone who would like to take
over. I alone simply do not have enough capacity to wet my feet in two
rivers.

Indeed, if you or someone reading this would like to steer the direction
of future development of those plugins, let me know!

Nicola



More information about the ntg-context mailing list