Replies: 24 comments 8 replies
-
What aspects of maintenance for Windows are most troublesome for you @jalvesaq ? I am trying to figure out if I should try to contribute with lua,R, or C code that needs to be geared towards nvim-r support on Windows. As a Windows user that enjoys using this package daily I want to figure out if I can be of service so it can continue development instead of being frozen. |
Beta Was this translation helpful? Give feedback.
-
Thanks, @akthe-at! There is nothing especially difficult on Windows, but not every code written on Linux works on Windows. Currently, there is no open bug labeled "Windows", but they may appear at any time in existing code or be introduced with new features. If a bug were reported affecting only Windows, you could fix it. This is great! It will be much harder to keep support for Vim because the Vim maintainers would have to translate Lua into VimLanguage for every new feature and bug fix. |
Beta Was this translation helpful? Give feedback.
-
As a Windows user, I have also used NVim-R for years. It would be a pity if Windows support is dropped in the future. I want to help with testing NVim-R on Windows or contribute in any other way. |
Beta Was this translation helpful? Give feedback.
-
@she3o, if I feature freeze Nvim-R, your contribution will not have any consequences. Hence, instead of merging your pull request, I think it's better to create the organization and incorporate your code there. Who would like to be a member? Does someone want to contribute with ideas or pull requests, but prefer not to be a member of the organization? @she3o, @akthe-at, @hongyuanjia? @jamespeapen, @klmr, @mllg? Who else? We should probably agree on minimal rules for inviting or accepting new members. We also have to agree on a name, such "R-Vim-toolkit", "R-Nvim-tookit", "R-Nvim-suite", or another. If we do not foresee having a developer for Vim9, it might be more appropriate to use "nvim", than "vim" in the name. I can immediately feature freeze Nvim-R. Then, the next step can be either immediately starting the Nvim-R substitute (to preserve the history of the transition) or starting a temporary repository to later copy the code to the definitive Nvim-R substitute and delete the temporary repository. Either way, I can easily delete Vim specific code. But I would like suggestions on what more could be removed from Nvim-R codebase. I already have in mind:
Anything else would depend on converting existing VimScript to Lua (AI tools can help with this task) or adding new functionalities written in Lua. We can bring back removed features if they are requested by users in the future. I don't have a clear roadmap yet, but a possibility is:
|
Beta Was this translation helpful? Give feedback.
-
Just throwing this (https://github.com/dgkf/debugadapter) for DAP ideas. |
Beta Was this translation helpful? Give feedback.
-
Thanks, @PMassicotte ! I created a temporary repository starting the transition from VimScript to Lua. The configuration is already made in Lua, using the typical |
Beta Was this translation helpful? Give feedback.
-
Great! I will start looking to convert some vim into lua! |
Beta Was this translation helpful? Give feedback.
-
Good! I will take a break from this for a few days at least. So, there is no risk of duplicate effort. |
Beta Was this translation helpful? Give feedback.
-
Just for information, I have started to convert all "send code" functions into lua |
Beta Was this translation helpful? Give feedback.
-
Great! I will work on other files, but I will have time only on Sunday. An idea: as a transitional measure, to be able to test newly converted functions, if necessary and possible, we could keep a definition of an old VimScript function as a wrapper to the new Lua function. Something like: function OldVimFunction
lua require("r.module").new_lua_function()
endfunction Of course, this will be superfluous if the old Vim function is no longer called anywhere. |
Beta Was this translation helpful? Give feedback.
-
@she3o, I never used the interface Lua-C, but from what I could quickly see, there is room for optimization. Currently, we have the following:
Perhaps we may keep the first step as is, but:
Is this possible? Would it be an improvement? |
Beta Was this translation helpful? Give feedback.
-
I am wondering if keeping nvimr server would be necessary if we migrate to lua. Lua seems to have a wonderful The |
Beta Was this translation helpful? Give feedback.
-
I guess it would be better if we could use the Lua library for the TCP server. But we will still need the TCP client in nvimcom. What parts are problematic? |
Beta Was this translation helpful? Give feedback.
-
@akthe-at and @hongyuanjia : tmp-R-Nvim is finished and almost completely tested on Unix systems. It would be great if you could try it on Windows and fix the bugs that certainly it has. The README has a section highlighting the differences between Nvim-R and tmp-R-Nvim. |
Beta Was this translation helpful? Give feedback.
-
Some links in the README of tmp-R-Nvim were pointing to yet non-existent addresses. I "updated" them back to the present. Only "R-nvim/cmp-r" already exists. |
Beta Was this translation helpful? Give feedback.
-
I'd like to contribute. I am an R developer and can help with any R code, if needed. Thanks for working on this! |
Beta Was this translation helpful? Give feedback.
-
I am 3 hours deep into testing on Windows and haven't run into any issues yet. Everything seems much more responsive and snappier than nvim-r. Que bom, @jalvesaq ! ...Stay tuned in case I do find some issues beyond the whole neovim 9.5 vs nightly issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks! As usual with free software, you can test features, develop new ones, fix bugs, or optimize code. Currently, we are working at https://github.com/jalvesaq/tmp-R-Nvim |
Beta Was this translation helpful? Give feedback.
-
Time to close this discussion: |
Beta Was this translation helpful? Give feedback.
-
Congratulation! |
Beta Was this translation helpful? Give feedback.
-
The merit is yours too. |
Beta Was this translation helpful? Give feedback.
-
Tx! I was busy this week with job, but will finish the send-function PR this weekend. |
Beta Was this translation helpful? Give feedback.
-
🥳 Is it worth adding a note to Nvim-R's README directing people towards R.nvim? |
Beta Was this translation helpful? Give feedback.
-
It has in the README: "This is Nvim-R which improves Vim's support to edit R scripts. For Neovim users, this plugin was superseded by R.nvim." Also in Line 533 in 82b8468 |
Beta Was this translation helpful? Give feedback.
-
Neovim and R have some differences that make it difficult to take full advantage of either editor's features in a plugin supporting both editors simultaneously. So, following the conversation started at #795, I'm opening this discussion to propose the creation of a Github organization to develop and maintain R-related plugins to Vim and Neovim.
Some of the differences between Vim and Neovim are:
Only in Neovim:
Auto-completion with nvim-cmp.
Syntax highlight of code blocks in
doc/Nvim-R.txt
(depend on nvim-treesitter).Syntax highlight of float windows during omni-completion.
Syntax highlight of the R output in the built-in terminal (but colorout is an alternative for Vim on Unix).
Possibility of mapping
<M-->
asR_assign_map
.Only in Vim (or Neovim with the legacy system of syntax highlighting):
These are differences that users can see. For developers, the most striking difference is that in Neovim it's better to write plugins in Lua while Vim now has a new scripting language (Vim9). I no longer use Vim, and I don't want to keep maintaining code that I don't use. It will be much better for me to freeze the support for Vim and keep developing only plugins for Neovim. Hence, I propose to freeze the development of new features in Nvim-R but not abandon current Vim users; I would keep maintaining the code, fixing newly reported bugs, and backporting bug fixes from the new projects for a while.
The first task of the new organization would be to create substitutes for
Nvim-R
andcmp-nvim-r
. The substitute for Nvim-R would:Convert VimScript into Lua.
Make
<M-->
the defaultR_assign_map
and remove the complicated support for_
asR_assign_map
.Eliminate:
Support for legacy omni-completion.
Support for (un)commenting code.
Files:
R/complete.vim
R/comment.vim
R/vimrbuffer.vim
R/vimcom.vim
R/gui_running.vim
R/rmd.snippets
R/r.snippets
syntax/rdocpreview.vim
Support to anything that
languageserver
or a general plugin can do better.A substitute of
Nvim-R
for Vim could also be developed if someone in the organization was interested. The starting point would be easy: simply delete all specific Neovim code from the currentNvim-R
.A new plugin to be developed would be
nvim-dap-r
.Are you willing to join this organization? How could you contribute?
Beta Was this translation helpful? Give feedback.
All reactions