Live data from Hacker News

VSCode-Neovim: Use embedded Neovim in VSCode without emulation

github.com

31–40 of 112 posts

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#31
post #18

I love neovim but I don’t have a good replacement for the git plugin of vscode. I haven’t found my way to replicating that experience in neovim. I tried lazygit but I find the diff viewer hard to understand and navigate. Diff view ( https://github.com/sindrets/diffview.nvim ) might be it, but I haven’t made the time to install a newer version of git from source (Debian…)

I'm the same. For the most part, I use a nice terminal git diff (I forget which-- not in neovim), and I hop around in neovim based on what I see there. I do sometimes open Codium just to navigate a large diff, and it always makes me a little sad.

Similarly, I use diff-highlight 99% of the time because it works flawlessly with all of git diff's arguments (including --word-diff) but break out Meld for big content-heavy changes.

https://meldmerge.org/

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#32
post #18

I love neovim but I don’t have a good replacement for the git plugin of vscode. I haven’t found my way to replicating that experience in neovim. I tried lazygit but I find the diff viewer hard to understand and navigate. Diff view ( https://github.com/sindrets/diffview.nvim ) might be it, but I haven’t made the time to install a newer version of git from source (Debian…)

have you tried fugitive?

the vimcast videos about it can be life changing.

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#33

Personally, my problem with trying to use Vim keybindings in VS Code is not about the motions of moving around/editing the code itself, but everything else. You end up in plenty of situations where you have to resolve using the mouse because you ended up on some sub-page or whatever, where you either need to resolve using the mouse or keep pressing Tab until you get to where you want to go. Installing plugins is one…

Ctrl+shift+p puts the cursor in the command search where you can find all the commands including extension related commands. Ctrl+w j puts the cursor in the terminal.

VS code is entirely navigable with key strokes even with Vim emulator

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#34
post #3

Would love to see if people have a good experience with this. The only thing keeping me on neovim is the ergonomics of my config. If I can have that, PLUS the discoverability of all the LSP features, hovering, consolidated error messages, etc. without it breaking all the time, I would switch in a heartbeat.

Have you tried coc.nvim? I was in the same boat as you, trying to painlessly move away to a different editor with Vim keybindings or such, because I just couldn't get LSP stuff to work without constantly breaking. Since I started using Coc, it all just works magically, I just need a `:CocInstall` if I'm working in a new language.

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#35

Personally, my problem with trying to use Vim keybindings in VS Code is not about the motions of moving around/editing the code itself, but everything else. You end up in plenty of situations where you have to resolve using the mouse because you ended up on some sub-page or whatever, where you either need to resolve using the mouse or keep pressing Tab until you get to where you want to go. Installing plugins is one…

It's worth pointing out that while Vim/Neovim can be fully used without a mouse you can still use one if you want to.

That includes mouse wheel, clicking tabs, resizing windows, balloon help amongst others.

That works over SSH too.

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#36
I have used VSCode-Neovim on OSX since roughly NVIM v0.5. It is quite simply the best vim environment I've ever used and I've used quite a few. I date myself back to vim, back to vi and even to TECO. I pair this setup with the clangd LSP extension which makes it even more awesome. This is editor heaven.

However it isn't perfect, yet. Command mode is still a work in progress and I use command mode a lot. Navigation with the space bar screws up enough that I've switched to the arrow keys (which are smaller). A few others but I haven't checked to see if they're fixed already.

VSCode-Neovim is actively worked on and gets better with each release.

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#37
My biggest complaint is probably that it doesn't support overlay or popup windows, which makes it impossible to use plugins like WhichKey[0] and such, which I like on normal neovim because I'm a scrub and don't know vim hotkeys by heart

0: https://github.com/folke/which-key.nvim

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#38

I don't use VSCode, but if you use this plugin or the other Vim plugin for VSCode, make sure to put it in its own thread so it doesn't compete with other blocking tasks and slow down your editor motions. See "Affinity" docs here for putting it in its own thread: https://github.com/vscode-neovim/vscode-neovim#installation

This must be a new option, hadn't seen it before. Thanks!

It's new within the last year for sure! It's also marked "experimental" and I think therefore not heavily advertised, but IMO it's also necessary for something like Vim motions that need to move at the speed with which you type…

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#39

To me the greatness of using something like neovim/vim is that you don't have to use the mouse. This I don't know what's good for...

Good for people who like the ergonomics of VSCode (one-click plugin installs, everything simply "just works" out of the box) with the ergonomics of Vim (modal editing, speed).

This. I'll go to VSCode from Neovim kicking and screaming, but frankly VSCode + a good Vim plugin is the pragmatic choice for most people out there looking for a Vim-like editor.

Re: VSCode-Neovim: Use embedded Neovim in VSCode without emulation

#40
You might be able to convince me that for certain languages and tasks, a Jetbrains editor is better than using a plugged up Vim or Emacs. And the up front cost is well known, and their corporate model is easy to understand.

You’ll never convince me, however, that Microsoft’s embrace, extend, extinguish partially proprietary editor that uses the same LSPs as any other LSP client should be used by anyone. I wouldn’t touch it with a 100 foot pole.

There are turn key solutions for both Emac, Vim, and Neovim. They can all talk to LSPs, have DAP clients, fuzzy finders, file tree explorers, project managers, remote editing (terminal editors are by nature the ultimate remote editors).

Why isn’t he world would you put neovim inside of VSCode when you could just use neovim directly via GUI or terminal.

Post reply on HN