ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Neovim and ConTeXt
@ 2021-11-24  8:30 Clint Grady via ntg-context
  2021-11-24 10:59 ` Aditya Mahajan via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Clint Grady via ntg-context @ 2021-11-24  8:30 UTC (permalink / raw)
  To: ntg-context; +Cc: Clint Grady


[-- Attachment #1.1: Type: text/plain, Size: 510 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 966 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Neovim and ConTeXt
  2021-11-24  8:30 Neovim and ConTeXt Clint Grady via ntg-context
@ 2021-11-24 10:59 ` Aditya Mahajan via ntg-context
  2021-11-25 14:46   ` Nicola via ntg-context
  0 siblings, 1 reply; 6+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-11-24 10:59 UTC (permalink / raw)
  To: Clint Grady via ntg-context; +Cc: Aditya Mahajan

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
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Neovim and ConTeXt
  2021-11-24 10:59 ` Aditya Mahajan via ntg-context
@ 2021-11-25 14:46   ` Nicola via ntg-context
  2021-11-25 15:24     ` Aditya Mahajan via ntg-context
  2021-11-26  6:16     ` Clint Grady via ntg-context
  0 siblings, 2 replies; 6+ messages in thread
From: Nicola via ntg-context @ 2021-11-25 14:46 UTC (permalink / raw)
  To: ntg-context; +Cc: Nicola

On 2021-11-24, Aditya Mahajan via ntg-context <ntg-context@ntg.nl> 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Neovim and ConTeXt
  2021-11-25 14:46   ` Nicola via ntg-context
@ 2021-11-25 15:24     ` Aditya Mahajan via ntg-context
  2021-11-26  6:16     ` Clint Grady via ntg-context
  1 sibling, 0 replies; 6+ messages in thread
From: Aditya Mahajan via ntg-context @ 2021-11-25 15:24 UTC (permalink / raw)
  To: Nicola via ntg-context; +Cc: Aditya Mahajan

On Thu, 25 Nov 2021, Nicola via ntg-context wrote:

> Again, take a look at the wiki.

Noted! Time to update my decade old setup (but I have moved completed to the neovim camp). 

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Neovim and ConTeXt
  2021-11-25 14:46   ` Nicola via ntg-context
  2021-11-25 15:24     ` Aditya Mahajan via ntg-context
@ 2021-11-26  6:16     ` Clint Grady via ntg-context
  2021-11-29 13:18       ` Nicola via ntg-context
  1 sibling, 1 reply; 6+ messages in thread
From: Clint Grady via ntg-context @ 2021-11-26  6:16 UTC (permalink / raw)
  To: Clint Grady; +Cc: Clint Grady


[-- Attachment #1.1: Type: text/plain, Size: 3188 bytes --]

> 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 <ntg-context@ntg.nl> 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
> ___________________________________________________________________________________
> 

[-- Attachment #1.2: Type: text/html, Size: 4696 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Neovim and ConTeXt
  2021-11-26  6:16     ` Clint Grady via ntg-context
@ 2021-11-29 13:18       ` Nicola via ntg-context
  0 siblings, 0 replies; 6+ messages in thread
From: Nicola via ntg-context @ 2021-11-29 13:18 UTC (permalink / raw)
  To: ntg-context; +Cc: Nicola

On 2021-11-26, Clint Grady via ntg-context <ntg-context@ntg.nl> wrote:
> 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

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-29 13:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  8:30 Neovim and ConTeXt Clint Grady via ntg-context
2021-11-24 10:59 ` Aditya Mahajan via ntg-context
2021-11-25 14:46   ` Nicola via ntg-context
2021-11-25 15:24     ` Aditya Mahajan via ntg-context
2021-11-26  6:16     ` Clint Grady via ntg-context
2021-11-29 13:18       ` Nicola via ntg-context

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).