Are there any known ways to use ConTeXtLMTX with Neovim? I read the wiki page for Vim and it describes a hack to get latex-suite to work with ConTeXt. [1] It wouldn't be too much work to submit a pull-request to VimTeX (despite the name, this is for Neovim) [2] to add ConTeXt support, but I don't want to duplicate work if someone else has already done it. Clint [1]: https://wiki.contextgarden.net/index.php?title=Vim&mobileaction=toggle_view_desktop, bottom of page [2]: https://github.com/lervag/vimtex
On Wed, 24 Nov 2021, Clint Grady via ntg-context wrote:
Are there any known ways to use ConTeXtLMTX with Neovim?
Not that I am aware of.
I read the wiki page for Vim and it describes a hack to get latex-suite to work with ConTeXt. [1] It wouldn't be too much work to submit a pull-request to VimTeX (despite the name, this is for Neovim) [2] to add ConTeXt support, but I don't want to duplicate work if someone else has already done it.
Please do so. There are different levels of what it means for a editor to support a language. I guess that you are talking about async compilation support, but keep in mind that context has a different error format than latex for that needs to be set different as well. It will be nice to have support to pass command line flags via the editor. Context also has a (slightly buggy) syntax checker (mtxrun --script check ..) which could be integrated. I don't know what is the current state of context syntax highlighting support in vim/neovim (I use a highly modifies syntax file). It will be nice to have support of \startMP(code|page) and \startluacode to do syntax highlighting for metapost and lua. Metafun has added some new keywords and it will be nice to support those. I believe that context ships with a file that outputs all these keywords but I don't remember the name. It will be cool to have a more integrated support, like showing table of contents in the sidebar, (these are stored as a lua table in the tuc file and neovim has inbuilt lua interpreter, so...), modifying the jump keys so that so that ]] etc work correctly (with the context syntax) and so on. I'll be happy to test your pull request if you want. Aditya
On 2021-11-24, Aditya Mahajan via ntg-context
I don't know what is the current state of context syntax highlighting support in vim/neovim (I use a highly modifies syntax file). It will be nice to have support of \startMP(code|page) and \startluacode to do syntax highlighting for metapost and lua.
I maintain the ConTeXt's plugin for Vim. It has async compilation support, and context-sensitive (pun not intended) syntax highlighting. All is explained in the wiki. I would expect syntax highlighting and mappings to be functional in NeoVim, too (async jobs are incompatible with NeoVim, however). But, Vim and NeoVim have diverged enough that they should be considered totally different (and incompatible) programs. The new version of the ConTeXt plugin (which is not shipped yet) is written in Vim9 script, which NeoVim does not implement. My time is limited, so I can't support both platforms, and I have decided to stick with Vim. If anyone wants to try the new plugin, feel free to contact me via email.
Metafun has added some new keywords and it will be nice to support those. I believe that context ships with a file that outputs all these keywords but I don't remember the name.
Yes, that was added at my request (thanks Hans!). The command is: mtxrun --script mtx-interface --vim The next version of my plugin uses those. The version currently shipping with Vim was curated by hand, with the help of custom scripts to automate keyword extraction. It should be ok, although at this point not really up to date with the most recently added keywords.
It will be cool to have a more integrated support, like showing table of contents in the sidebar,
For that, I use the TagBar plugin, with custom Ctags configuration. Config is in the wiki!
modifying the jump keys so that so that ]] etc work correctly (with the context syntax)
The ConTeXt plugin in Vim does that. Again, take a look at the wiki. Cheers, Nicola
But, Vim and NeoVim have diverged enough that they should be considered totally different (and incompatible) programs. The new version of the ConTeXt plugin (which is not shipped yet) is written in Vim9 script, which NeoVim does not implement. My time is limited, so I can't support both platforms, and I have decided to stick with Vim. If anyone wants to try the new plugin, feel free to contact me via email.
I'd be very happy to try the new version of the plugin. I'm also happy to work on porting it to NeoVim. Clint On Thu, 25 Nov 2021, at 15:46, Nicola via ntg-context wrote:
On 2021-11-24, Aditya Mahajan via ntg-context
wrote: I don't know what is the current state of context syntax highlighting support in vim/neovim (I use a highly modifies syntax file). It will be nice to have support of \startMP(code|page) and \startluacode to do syntax highlighting for metapost and lua.
I maintain the ConTeXt's plugin for Vim. It has async compilation support, and context-sensitive (pun not intended) syntax highlighting. All is explained in the wiki. I would expect syntax highlighting and mappings to be functional in NeoVim, too (async jobs are incompatible with NeoVim, however).
But, Vim and NeoVim have diverged enough that they should be considered totally different (and incompatible) programs. The new version of the ConTeXt plugin (which is not shipped yet) is written in Vim9 script, which NeoVim does not implement. My time is limited, so I can't support both platforms, and I have decided to stick with Vim. If anyone wants to try the new plugin, feel free to contact me via email.
Metafun has added some new keywords and it will be nice to support those. I believe that context ships with a file that outputs all these keywords but I don't remember the name.
Yes, that was added at my request (thanks Hans!). The command is:
mtxrun --script mtx-interface --vim
The next version of my plugin uses those. The version currently shipping with Vim was curated by hand, with the help of custom scripts to automate keyword extraction. It should be ok, although at this point not really up to date with the most recently added keywords.
It will be cool to have a more integrated support, like showing table of contents in the sidebar,
For that, I use the TagBar plugin, with custom Ctags configuration. Config is in the wiki!
modifying the jump keys so that so that ]] etc work correctly (with the context syntax)
The ConTeXt plugin in Vim does that. Again, take a look at the wiki.
Cheers, 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 ___________________________________________________________________________________
On 2021-11-26, Clint Grady via ntg-context
I'd be very happy to try the new version of the plugin. I'm also happy to work on porting it to NeoVim.
If my email is not visible through the mailing list (yours is not to me), you may find it in the source code of the ConTeXt plugin in Vim ($VIMRUNTIME/ftplugin/context.vim). Drop me a line and I will happily send you the pre-release version. Nicola
participants (3)
-
Aditya Mahajan
-
Clint Grady
-
Nicola