-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Neovim Integration Feedback #1735
Comments
Reading .nvimrc (mappings etc) and using plugins from vim/neovim in VSCode (everybody a lil bit a freak, do not judge me) |
@FelikZ So for you, reading key mappings from .vimrc and plugins? What are the main plugins you're interested in? |
@Chillee I would love to see support for following plugins:
|
@aakashsigdel Surround and Commentary/Tcomment are both already implemented. Vim-fugitive support is something that seems very difficult/impossible even with full Neovim support (although I'm not ruling it out completely). Vim-fugitive is too closely tied to vim display elements (buffers, tabpages, splits, etc.) I have some ideas about how it might be possible, but honestly, it seems unlikely that vim-fugitive will be able to be supported properly. |
@Chillee
Some of day-use plugins are missing (or partially missing).
It is solvable by |
I think neovim should be used to do any heavy lifting and anything that you would have to write yourself. I should be able to farm out ex commands to neovim so that it can run external programs for me and what not. Also, I should be able to have settings and keybindings in my vimrc and not have to reproduce them again in a much more verbose way in settings.json. I can see how many plugins will be rather difficult to implement. Usually vim plugins add language support, autocompletion, snippets, file finding, etc and those are all provided already by the editor and the editor extensions. I think the most useful vim plugins to add here are those that provide movement/navigation help (vim-repeat, vim-surround, vim-commentary, targets, vim-easymotion). In general, I would love to see more automatically included keybinding support for doing vscode operations in a vim-like way. For example, I should be able to open up the terminal or switch to/from the file finder using leader or g commands. Also, diffing within the editor is something common that I do in vim (diffthis, diffoff, etc) |
Starting from the next release, you'll be able to offload all ex commands (except a couple) to neovim. Just set
This is currently part of the plan. The way I'm imagining this working is by having a command that will sync between the settings.json and your .vimrc.
Even something like easymotion is non trivial to implement through neovim. Easymotion's labels don't have a direct translation to Vscode.
I disagree about this one. Although we've added things like |
My point about the keybinding support stems from the fact that when I use vscode even with the vim extension, my hand navigates to my mouse too much because I haven't been provided a natural/obvious way to perform some functions. Maybe it will just take more customization and learning on my part to get it all right and have a workflow where I don't have to go to the mouse any more. |
When Vscode has an analogue for stuff that you can do in vim, like However, upon thinking about it some more, I think you might be right that we should implement some more vim like behavior. Any places in particular where you find yourself using the mouse a lot? |
File navigation I know these already have some keymaps that I just haven't become used to yet, but they aren't my vim maps... Another extension I use a lot is BufKill (:BD) that allows me to close out the active buffer without closing the split. I just want to do everything with ex commands and leader key sequences! |
Integration of Neovim is very exciting news. Thank you for doing this! What currently keeps me from using VSCode is its limited ability for window layouts, see microsoft/vscode#14909. Therefore, what I would like to see is that Neovim handles the buffers / splits within an editor window in VSCode. |
@eglimi Unluckily, that's not likely to come in the near future. There's a fundamental difference between vscode windows/tabs and what they're capable of. I've thought of how we might be able to embed neovim views into VSCode, but any work on that is still a long way off. |
It would be cool if a slim neovim was installed automatically based on your
own OS into some subdirectory of VSCode.
…-- gary furash | furashgary@gmail.com, 520-907-2470
On Fri, May 26, 2017 at 1:54 PM, Horace He ***@***.***> wrote:
@eglimi <https://github.com/eglimi> Unluckily, that's not likely to come
in the near future. There's a fundamental difference between vscode
windows/tabs and what they're capable of.
I've thought of how we might be able to embed neovim views into VSCode,
but any work on that is still a long way off.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1735 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AOT5tTsRxxqNe3T4ukSmskDhZ9a5FLSnks5r9zvugaJpZM4Nh7Uw>
.
|
@GaryFurash Unluckily, VSCode's support for native dependencies is a bit lacking. See microsoft/vscode#6929 We might still do it (especially if we decide to make neovim a required dependency), but we need a bit of discussion (and more testing of neovim) on that front. |
@Chillee my 2 cents:
All in all I'd say: create hooks for the people who use NeoVim thus giving them the possibility to do what they want, but develop for the system Vim. This strikes the perfect compatibility balance between NeoVim, Vim, and pure VScode users. |
@JORVI Here are my thoughts:
As a side note, this github issue was created for feedback, so I'm going to clean up some of the help comments that are fixed or moved to another issue. |
That only benefits the subset of VScodeVim users that will use the feature(s) that engage NeoVim. See my next point.
Yes, I am advocating for targeting Vim instead of NeoVim, because adding an external dependency is annoying. Making it mandatory is even worse, and including NeoVim, even for people who never use Ex-commands seems like unnecessary bloat. I can also see a future where there will be the choice: either implement a feature the easier way by making some calls to NeoVim, or the harder way by implementing it natively.. if the choice gets made that the easier road will be be taken, you've suddenly divided your userbase (NeoVim vs 'minimal' users). |
The entire premise of neovim is to provide a fast API to vim for integration with other editors. |
@offero that's just plain wrong. The starting premise of NeoVim was async support, and the premise now is a cleaned-up version of the Vim codebase that allows for more extensibility of Vim. Nowhere does it say one of the explicit goals is to allow other editors to hook into NeoVim. @VSCodeVim devs |
@JORVI
From https://www.bountysource.com/teams/neovim/fundraiser
|
@offero damn.. I have no idea how I read over that. At any rate, I think I've advocated the native/minimalist viewpoint strongly enough, I'll shut up now and see where the discussion goes :) |
@JORVI I agree: As it currently stands, it is probably a bad idea to bundle neovim in with the extension. However, we might potentially want to integrate more and more of neovim into VSCodeVim. The undo tree, .vimrc settings, actual support for vim plugins, fixing the long tail of bugs that come from subtle differences in how vim is implemented, etc. If/when those features drop, they would require neovim as a dependency. And as such, we would have 3 options:
The 3rd option seems like the best one to me. Note: As I said earlier, vim is not suitable for providing an API around. If we want any of the features I listed above, they will have to come from neovim. |
I think that there will be a point where this package becomes so integrated and dependent on neovim, that it will be required to have neovim as a dependency. At which point, there will be people that would prefer the "legacy" version without neovim support and someone in the community that wants this version can fork the project and maintain their own plugin. You should not be the one to have to maintain two versions. |
I had never heard of Neovim until this latest update. Looking into it, it sounds like a good idea. I would like to suggest modifying the readme file a bit to help show people why you're encouraging a dependency. You could either borrow text from or link to the Neovim website where it gives a good reason as to why Neovim is worth my time installing. Another link I found helpful, but may not be as necessary is their vision. |
I would like to share my perspective as a very happy vscode and VSCodeVim user. I wouldn't use vscode without VSCodeVim, and I am grateful for all your work. I would like to second @JORVI's point that, at least for me, the VSCodeVim emulation is good enough, and I don't need all of vim's features to be happy. If I wanted all of vim's keybindings and support for custom plugins, I would use (neo)vim instead of vscode. But what I really want is vscode's awesome language plugin support and its modern GUI, and so that's why I use vscode. I worry that integrating VSCodeVim with neovim will be a tricky project that might make the extension work less well. For example, it seems difficult to integrate neovim's undo tree with a potential vscode-native undo tree. Whenever vscode tells me VSCodeVim has a new update, I am excited to see what vim shortcuts I can now also use in vscode. Though better ex commands is nice, I found the release notes for 0.8.2 concerning since I really don't want VSCodeVim to break, and that's what encouraged me to comment here. I know this doesn't quite answer the question "what features from neovim integration would you guys like to see implemented first", but I hope it's useful feedback anyway. Thanks for the plugin. |
Thanks for your explanations, I really appreciate your effort. I found that I made a fundamental mistake. I pointed the neovim path to the neovim installed on my remote machine, but the local neovim path should be pointed instead. My problem was solved after I changed to the local path. |
I am perfectly happy with current vscodevim as far as my current knowledge of vim goes, great job. By the way, for those that oppose this "because minimalism", I would note that baking neovim's functionalities into vscodevim doesn't make it any lighter than bundling neovim with it (the code's getting in either way), nor any simpler for the user (as long as it's installed automatically with it). It only makes it harder for the devs that maintain the plugin. |
@Mirag-e There is a project to do just this (https://github.com/Chillee/VSCodeNeovim) but it's been dead for a while. You might find https://github.com/onivim/oni2 interesting also. |
thanks for the pointers, oni2 seems super interesting, though i'm a bit sad it's not fully open source. I guess that's the price to pay when you don't have microsoft paying your main developers. |
I wish VSCodeNeovim was active. I'd work on it myself if I have the time, but, alas... Ex commands may be useful, but I've never actually used them. The VSCodeVim plugin seems to work well a lot of the time, but I find it to be a bit finicky sometimes, which is why I personally would love to see neovim power it. Oni2 looks super interesting, since they intend to support vscode extensions and configuration... and for $20, I don't mind speculating that the project will work out. Time will tell. |
I'm not trying to discourage you to support this cool project. Just FYI after using Oni (1) I dropped it fairly quickly. (it was finicky about what neovim versions I had installed and it was buggy) |
Thanks for the heads up. It seems they've taken a different approach with Oni2 though, using libvim instead of neovim. I read somewhere that the choice was because of integration issues with neovim. You may already know this, but it seems like if you have supported Oni1, you will have access to Oni2 https://onivim.github.io/docs/other/faq#i-already-backed-onivim-1-do-i-need-to-pay-again so hopefully your support for Oni1 will be worth it if Oni2 is successful. |
I installed Neovim and set it active in order to be able to use regular expressions in the substitute command. However, it does not seem to work for the substitute or global command. If I use:
I get the error: Any ideas about how to make this work? |
+1 @Orionsg This feature had been working for me for quite some time but it has been broken recently :/ Similar error message about |
One thing I miss is netrw being able to open a url with |
I have also recently started seeing the error: "TaskQueue: Error running task. Failed to handle key= . nvim_buf_set_lines: Wrong type for argument 1, expecting Buffer.". As an additional data point I also get the error when I try to run a non-existent command, like |
I also got the I'm sure the latest Vim 1.11.0 version caused this issue, and downgrade to the Vim 1.10.2 can fix it. |
For the With this thread growing to the size it has, it has inevitably become an all-encompassing dumping ground for all neovim-related bugs and has made it hard to track individual bugs that people have encountered. As such, I'm going to close this issue. If you encounter an issue with neovim integration or vscodevim in general, please file a new issue (or search through existing issue) with repro steps, etc. |
Sorry for bumping this thread. For anyone interested i made experimental neovim integration. (ext: vscode-neovim). You might want to give it a a try. |
@asvetliakov Cool! Are you aware of https://github.com/Chillee/VSCodeNeovim? |
@J-Fields Yes, actually i've been hoping for a long time it would become complete usable integration. But unfortunately that didn't happen 😄 |
@asvetliakov Nice job! I've been wanting to get back to working on that for quite some time, but I just haven't had the time to do so. |
@asvetliakov Awesome news. Looking forward to read the code! |
Where does the output of tl;dr: Where is |
Yanking with the global command always put everything into the default register, and the 'append to register' command always add a copy of the last item to the beginning. commands: test content:
|
I'm trying to copy current line to previous cursor line using Eventually I want to implement this mapping |
:<,>s/old/new/g just replace the first match word in the file |
This command is working when neovim integration is disabled |
I mapped (leader) space + n as
However, this key mapping is not working when using neovim vscodevim in vscode. Have I missed anything important here? |
When using remote development, Supposing I use two laptops to connect to the same remote ec2 instance. The laptops have different paths for I think that the Lines 989 to 994 in 349ce01
https://code.visualstudio.com/api/references/contribution-points#contributes.configuration
|
Seems that I have to add the following in the settings.json of vscode explicitly:
|
Also see vscode-neovim/vscode-neovim#1789 |
If I understand correctly, VSCodeVim can't use Neovim extensions, right ? |
You are right, it can't use neovim extensions... But some are pretty helpful, leap.nvim is one of them, there's even a PR for an implemented version in normal vscodevim, with 2 years now... Btw it seems this neovim integration is dead... The vscode neovim extension doesn't even use commands in statusbar and many things are not right, this implementation should continue. |
We have now added Neovim integration for Ex-commands. Enable it with
vim.enableNeovim
. Note that you must have neovim installed for this to work.What are opinions on neovim being an optional dependency / maybe becoming a mandatory dependency down the line? We might be able to bundle it together with the extension down the line.
People clearly want neovim support. What are the main reasons for that? In other words, what features from neovim integration would you guys like to see implemented first?
Also, please come to http://vscodevim.slack.com! We'd love to hear discussion in there (discussion/feedback tends to be a bit quicker in there).
The text was updated successfully, but these errors were encountered: