* (any) neovim users? @ 2022-10-14 15:00 Alan Braslau via ntg-context 2022-10-14 16:48 ` Nicola via ntg-context 2022-10-15 7:45 ` Hans Hagen via ntg-context 0 siblings, 2 replies; 8+ messages in thread From: Alan Braslau via ntg-context @ 2022-10-14 15:00 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Alan Braslau A recent upgrade of the editor neovim leads to the following error when using %&context identification at the head of .tex source files. Error detected while processing BufReadPost Autocommands for "*": Error executing lua callback: /usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: attempt to index local 'format' (a number value) stack traceback: /usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: in function 'ft' vim/filetype.lua:2362: in function 'dispatch' vim/filetype.lua:2522: in function 'match' /usr/local/share/nvim/runtime/filetype.lua:12: in function </usr/local/share/nvim/runtime/filetype.lua:11> Has anyone encountered this? (perhaps it has been fixed upstream?) Alan -- Alan Braslau 816 West Mountain Avenue Fort Collins, CO 80521 USA mobile: (970) 237-0957 Conserve energy! ;-) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (any) neovim users? 2022-10-14 15:00 (any) neovim users? Alan Braslau via ntg-context @ 2022-10-14 16:48 ` Nicola via ntg-context 2022-10-14 17:26 ` Alan Braslau via ntg-context 2022-10-15 7:45 ` Hans Hagen via ntg-context 1 sibling, 1 reply; 8+ messages in thread From: Nicola via ntg-context @ 2022-10-14 16:48 UTC (permalink / raw) To: ntg-context; +Cc: Nicola On 2022-10-14, Alan Braslau via ntg-context <ntg-context@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 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (any) neovim users? 2022-10-14 16:48 ` Nicola via ntg-context @ 2022-10-14 17:26 ` Alan Braslau via ntg-context 2022-10-14 18:59 ` Nicola via ntg-context 0 siblings, 1 reply; 8+ messages in thread From: Alan Braslau via ntg-context @ 2022-10-14 17:26 UTC (permalink / raw) To: Nicola via ntg-context; +Cc: Alan Braslau, Nicola On Fri, 14 Oct 2022 16:48:42 -0000 (UTC) Nicola via ntg-context <ntg-context@ntg.nl> wrote: > On 2022-10-14, Alan Braslau via ntg-context <ntg-context@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? 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. Beyond this, I would think that neovim with lua scripting would be greatly preferable to vim9scripting. Indeed, while I do not know anything about the details, perhaps it could even use the same lpeg code as developed for the Scite editor. Alan ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (any) neovim users? 2022-10-14 17:26 ` Alan Braslau via ntg-context @ 2022-10-14 18:59 ` Nicola via ntg-context 2022-10-14 20:21 ` Henning Hraban Ramm via ntg-context ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Nicola via ntg-context @ 2022-10-14 18:59 UTC (permalink / raw) To: ntg-context; +Cc: Nicola On 2022-10-14, Alan Braslau via ntg-context <ntg-context@ntg.nl> wrote: > On Fri, 14 Oct 2022 16:48:42 -0000 (UTC) > Nicola via ntg-context <ntg-context@ntg.nl> wrote: > >> On 2022-10-14, Alan Braslau via ntg-context <ntg-context@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 ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (any) neovim users? 2022-10-14 18:59 ` Nicola via ntg-context @ 2022-10-14 20:21 ` Henning Hraban Ramm via ntg-context 2022-10-14 22:05 ` Alan Braslau via ntg-context 2022-10-14 22:16 ` Alan Braslau via ntg-context 2 siblings, 0 replies; 8+ messages in thread From: Henning Hraban Ramm via ntg-context @ 2022-10-14 20:21 UTC (permalink / raw) To: ntg-context; +Cc: Henning Hraban Ramm Isn’t the tree-sitter parser enough for syntax highlighting in NeoVim? https://wiki.contextgarden.net/pm39_tree_sitter_parser https://github.com/pmazaitis/tree-sitter-context_en (I don’t use either and can’t help further.) Hraban ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (any) neovim users? 2022-10-14 18:59 ` Nicola via ntg-context 2022-10-14 20:21 ` Henning Hraban Ramm via ntg-context @ 2022-10-14 22:05 ` Alan Braslau via ntg-context 2022-10-14 22:16 ` Alan Braslau via ntg-context 2 siblings, 0 replies; 8+ messages in thread From: Alan Braslau via ntg-context @ 2022-10-14 22:05 UTC (permalink / raw) To: Nicola via ntg-context; +Cc: Alan Braslau, Nicola On Fri, 14 Oct 2022 18:59:24 -0000 (UTC) Nicola via ntg-context <ntg-context@ntg.nl> wrote: > > 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. The error has appeared with neovim v.0.8.0. Alan ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (any) neovim users? 2022-10-14 18:59 ` Nicola via ntg-context 2022-10-14 20:21 ` Henning Hraban Ramm via ntg-context 2022-10-14 22:05 ` Alan Braslau via ntg-context @ 2022-10-14 22:16 ` Alan Braslau via ntg-context 2 siblings, 0 replies; 8+ messages in thread From: Alan Braslau via ntg-context @ 2022-10-14 22:16 UTC (permalink / raw) To: Nicola via ntg-context; +Cc: Alan Braslau, Nicola On Fri, 14 Oct 2022 18:59:24 -0000 (UTC) Nicola via ntg-context <ntg-context@ntg.nl> wrote: > 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! I thank you and any/everyone in the community who contributes in an way, and of course my question was not meant as a critique of any tool or package or plugin. In fact, I do *not* use any plugin functionality such as async typesetting. I do find syntax (color) highlighting helpful, sometimes (when it works ;-) It generally presently has many problems. Neovim integrates a lua parser. Unfortunately, I believe that it is still lua 5.1. Nevertheless, it could possibly benefit from the (maintained) lpeg Context syntax parser. Getting an error message now with %@context is annoying. Hopefully, somebody on this mailing list may know and care something about this. Alan ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (any) neovim users? 2022-10-14 15:00 (any) neovim users? Alan Braslau via ntg-context 2022-10-14 16:48 ` Nicola via ntg-context @ 2022-10-15 7:45 ` Hans Hagen via ntg-context 1 sibling, 0 replies; 8+ messages in thread From: Hans Hagen via ntg-context @ 2022-10-15 7:45 UTC (permalink / raw) To: Alan Braslau via ntg-context; +Cc: Hans Hagen On 10/14/2022 5:00 PM, Alan Braslau via ntg-context wrote: > A recent upgrade of the editor neovim leads to the following error > when using %&context identification at the head of .tex source files. > > > Error detected while processing BufReadPost Autocommands for "*": > Error executing lua callback: /usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: attempt to index local 'format' (a number > value) > stack traceback: > /usr/local/share/nvim/runtime/lua/vim/filetype/detect.lua:1248: in function 'ft' > vim/filetype.lua:2362: in function 'dispatch' > vim/filetype.lua:2522: in function 'match' > /usr/local/share/nvim/runtime/filetype.lua:12: in function > </usr/local/share/nvim/runtime/filetype.lua:11> > > Has anyone encountered this? (perhaps it has been fixed upstream?) looks like some wrong alias elsewhere ... add local format = string.format before that error line ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-10-15 7:45 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-10-14 15:00 (any) neovim users? Alan Braslau via ntg-context 2022-10-14 16:48 ` Nicola via ntg-context 2022-10-14 17:26 ` Alan Braslau via ntg-context 2022-10-14 18:59 ` Nicola via ntg-context 2022-10-14 20:21 ` Henning Hraban Ramm via ntg-context 2022-10-14 22:05 ` Alan Braslau via ntg-context 2022-10-14 22:16 ` Alan Braslau via ntg-context 2022-10-15 7:45 ` Hans Hagen 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).