VSCode with embedded Neovim
HTML-код
- Опубликовано: 5 сен 2024
- Link to blog:
www.chrisatmac...
Patreon:
/ chrisatmachine
Paypal:
paypal.me/chri...
Link to my Neovim config:
github.com/Chr...
Ask questions on discord:
/ discord
Music by Chillhop Music:
chillhop.com
Files:
settings.vim: github.com/LunarVim/LunarVim/blob/4625145d0278d4a039e55c433af9916d93e7846a/vscode/settings.vim
vscode keybindings and setting: github.com/LunarVim/LunarVim/tree/4625145d0278d4a039e55c433af9916d93e7846a/utils/vscode_config
Hi Chris,
Great work, seriously you rock man!
There seems to be some missing pieces. I already have some Neovim configs I'm trying (Lunarvim, AstroNvim). I can't just put the init.vim inside the ~/.config/nvim folder.
How do I go about solving that problem?
And when I look in your init.vim, there seems to be many other files that are sourced in that init.vim. Does Neovim take care of all that of should I create each and every one of them? (or is this a stupid question?)
Also the blog page mentioned in your video is missing.
Could you please create a repo for the files necessary to setup VSCode like you've shown in this video?
@@brittager hey if you don't have an existing init.vim you can just make one and copy paste everything from the settings.vim link into it. Thats what I did and it worked.
@@devricky I’ll try that. Thank you !
what are those gutter icons @ 2:23
the install says i have to install neovim..
but i installed only extension, and basic things seem to be working...
is neovim installation required, or i can just install the extension?
HOLLY CRAP!!!! AWESOME setup. Well done. I've been gradually switching from vim to neovim, and on occasion drop into VS Code. Many wonderful little gems in this setup. Can't give you enough praise. I also really like how you open the video showing what it does. Then get to the details later. I wish more people would do that. That alone earned a thumbs up from me.
Man this is just what I wanted. Normal vim extension is limited compared to this. Thanks dude
You basically made my life a lot easier
Thank you!
Windows 10 install steps: I used the regular VScode not vscodium
Setting up Neovim
- download Neovim I saved to path C:\Neovim
- go into your terminal and enter neovim with 'nvim' for windows/git-bash I had to use 'winpty nvim'
- type :help init.vim
- go to file path that is given. if there is no init.vim there, then create one. I did not have one by default so I created one using the path that was given
- go to where init.vim is supposed to be. my path was C:\Users\USERNAME\AppData\Local
vim
- create a new folder and call it nvim if it doesn't exist. inside the folder create init.vim. open it either with nvim or vscode
- copy/paste all the contents from Chris' settings.vim into init.vim
Setting up VScode
- download the extensions neovim and which key
- set path in extension settings for neovim to your nvim.exe ( where you installed Neovim my path was C:\Neovim\bin
vim.exe ) make sure the setting field matches your OS
- set path to your init.vim ( C:\Users\USERNAME\AppData\Local
vim\init.vim )
- use command palatte (cmd+shift+p) type in settings.json and click on preferences: Open Settings (JSON)
- in right pane copy and paste Chris' settings.json contents in. I did not copy everything because I wanted to preserve some of my own settings. I copied line 6 to 578.
- use command palette (cmd+shift+p) type in keyboard shortcuts and click on preferences: Open Keyboard Shortcuts (JSON)
- copy the contents inside of the [ ... ] from Chris' keybindings.json and paste inside of your [ ... ]
- reload VScode or close and reopen. Everything should be set. If you get an error it would probably be from the settings.json and due to mismatching curly braces { ... } or a missing comma.
good luck!
lifesaver!
That's so much better than what I have with vim plugin on vscode. Thanks for sharing this, totally gonna try it!
My dude. Your vim game is on another level. Thank you!
Just as I finished setting up VSCode Vim I found this video.... time to set it all up again
3 weeks later I've fully migrated to neovim as my main
Part 1 all the thing that you can do in vscode
Part 2 extension and configuration
- Completion 0:48
- Which key, Splits and moving 1:29
- Show Plug 10:43
This video is a godsend, I've had coworkers talking about you and this video as we all use vscode. I sometimes develop in vim but usually in vscode and almost all the things that bothered me are fixed in this video. Don't listen to the haters!
Thanks man, I started using this setup for work since we do pretty much everything in Java and Neovim just isn't there yet for Java development in my opinion. I'm glad this works for you.
@@chrisatmachine oh, now I see, pity to hear that, isn't coc-java good enough? I'm pretty happy for a php setup
This is a GOD SEND! I love VIM but have transitioned to data science and VSCODEs Ipython integration is just one step above anything I can do in a terminal. This saves me
This is by far my most favorite video. Props!
This is perfect for a VSCode setup at work where they don't allow Neovim. Thanks for this!
They don't allow Neovim? lol
Jayden were you able to get everything working? I'm confused as to where to place the files he provides. I have VSCode NeoVim and Which key installed, but where do I place the files?
@@Robd515 So I had to recreate the settings using VSCode vim plugin (because Neovim isn't allowed) this was done in the settings.json file. You can open it from the Ctrl+Shift P command menu
Thank you so much for making this video! I never would have found out about this otherwise, it pretty much is exactly what I want.
Can you do an updated video of your configs with VScode Neovim?
I second this
@@SogMosee I Third this...
I Fourth this...
I fifth this
i sixth this
Lol I love that this video came out just as I was doing this journey myself. I got tired of porting everything to WSL just for VIM and this helped make the transition much less confusing.
I'm trying to set this up on Windows now, but it's failing in reading my init.lua file. Do you know if it's unable to use a init.lua or if theres any fix to this?
@@4j11kMqiREjhp Gonna be honest, I haven't been using this extension since I left this comment, I just went back to normal nvim lol. But I looked on the issues and there are a few closed issues saying that init.lua should be working. you might need to explicitly point to your init.lua within the extension settings. Good luck!
dude dis guy is a wizard!!!!
idk about other people...im not so crazy about using only nvim and nothing else...im not..i like using vscode, its atlest "more" functional out of the box, and I also like vim...u made mu day!!
After all struggles i made it work in my windows 10 :)
my config -
github.com/MohamedIrfanAM/neovim-windows
Thanks for the video!
To be able to type capital K and have hover menu you'll have to exclude insert mode:
{
"key": "shift+k",
"command": "editor.action.showHover",
"when": "editorTextFocus && neovim.mode != 'insert'"
}
All working except for the comment function
Has anyone else had problems commenting the code in normal mode?
Only works in insert mode
Create a map in your vim config using the built-in vscode command
This video is exactly what i am looking for, thank u Chris, great work!!!
I spent 19 mins while watching the video in constant awe. Wow. Thank you so much for this.
I am transitioning back to VSCode from Emacs with Evil bindings, it is going to be a landslide with these settings.
I have been using vscode for sometime now. I will give neovim + vscode a shot.
Thanks for this video
MIND F$#&ING BLOWN! Bravo!!! Thank you, this has to be given to the masses.
Could you show how you would embed VSCode with your new neovim from scratch series? Really appreciate your work! Just struggling with the translation with the ".lua" files and the ".vim" files
The Repo for the settings does not exist anymore :(. Does anyone still have them by any chance?
Did you ever find them?
@@SogMosee seems their are pinned by OP but i didn't test it
Hi, I can't find your settings.vim I see it was removed. Do you mind sending it ? Thanks
Its amazingly helpful cause my config in neovim is almost same as you, so THANKS!
the blog post was deleted :(
Has your vscode config been deleted? I can't find it at the link in the description.
Same here... :(
since i started to use vim, i have a lot fun while coding
wow thank you for this video. Just setup up my config with vscode. Neovim with Vscode extensions makes an OP editor😂
Not being able to move into the folders pane via CTRL+H/L was the one thing that kept me away from using vscode, thank you for this video! Did you delete the settings.vim in your repo, though? The link from your article is showing 404.
go under lunarvim/utils/ and you should see all my vscode settings
@@chrisatmachine I don't see it
Hey!, I can't seem to access your settings.vim file, I get 404. Can you help me out here, please? Thank you
Great video chris, keep it up.
I followed what you said until the part where I needed your settings... Your repo is deleted, can you please help us? We need your settings.vim file
It is not deleted. The links have changed
@@surajmaharana2608 If it's that easy, simply paste the 'new' link here please
@@bsen2267 did you find the repo link?
@@babitasaha6655 no I couldn't find it yet
@@bsen2267 oh
If anyone is having issues getting the explorer navigation to work, make sure this is set in the settings JSON:
"workbench.list.automaticKeyboardNavigation": false
This guy is a genius. What a amazing plugin.
For me, on ubuntu, the movement keys don't work when I switch to explorer, CTRL-h and Ctrl-l don't work either. Keys are captured by explorer search. But I am very happy with the other settings working, thank you very much.
Had the same issue! Turning off "Automatic Keyboard Navigation" in VSCode's settings fixes this.
@@cr0_ Man thank you so much you made my day.
@@cr0_ thank you a lot 👍🏾👍🏾👍🏾
on Mac they dont work as well. If you turn of Automatic Keyboard Navigation it completely stops capturing keystrokes :(
on NeoVim its works like a charm, not in vscode/codium
Can you please do an updated lua version video?
Hey @ChrisAtMachine the links to the config files on the blog post are broken after you updated to the lua config. Thanks for sharing your knowledge.
Yea, there will be a lot of pain it seems during this update. I do have stable branches for the old config.
@@chrisatmachine I am a bit confused. You are now suggesting Lunar Vim is a better alternative . Is there a lunar vim config that does all that you have here. Also when I look at one of your early lunar vim videos it appears that the one line install creates the nvim config but now it appears to put configs into lvim. Does that mean we always launch nvim by running lvim (I know we can alias later) as I think originally you were running nvim directly after the config creation.
best neovim config in the world! it’s clean simple and powerful and definitely better ui than Vscode😃
Thanks, bro. I know I'm just a noob .... so I couldn't get the things working on windows. It would be a good idea to show us a step by step tutorial in another video. Thanks
@@fueledbycoffee583 Thank you very much. I appreciate your help
I'll do a step by step in the future. In the meantime I recommend at least getting WSL.
@@fueledbycoffee583 Did you make it ?
Thanks I finally figured it out. Nice!!!
Comment for your blog article. The AUR package is vscodium-bin - not vscodium. Thanks for your amazing work.
Love the videos. Thank you for doing them. I’m just getting into Vim but really love this setup. My only issue was with the ranger plugin...would keep failing when I would try and open a file. I need to dig into it to see why. What additional videos/topics do you plan on doing in the future?
A good way to find out what I plan on making videos about is to checkout the website and blog. There's stuff there I haven't gotten around to yet. I plan on doing a neovim video about project wide find and replace, some more deepspeech content, and probably a couple follow up videos to this one that are more from scratch.
ChrisAtMachine Found the issue with Ranger - documentation has changed and they are now recommending macs install ranger with pip3 instead of brew
Got this working on windows. Thank you!
Grazie thanks a ton mate 👍👍
Great video bro! Thanks a lot! BUT, It seems that the config is no longer available. Would you mind updating me where to find them or sharing them with me?
Please update the vim files used in the blog, they're no longer available
Great setup! One thing though, I can't find your settings.vim in your new Lunar repo, could you please share a link with me?
Yeah link no longer works, and I can't find it on Github.
Come on Chris, we need this 🏃
Bro you rock!!!!
While I'm waiting for my laptop, just need to use the one from my friend, and here the fastest solution for me is to use this vscodium neovim plugin. But, unfortunately, the configs link isn't available...But, still, great stuff! Will add some things by myself...Thanks!
Lifesaver 🥳
Thank you so much......
What a monster
Guess I should not preorder onivim2🤣 Thanks for vid, I do needed it so much
I don't see a reason to pay that amount of money personally.
I don't think neovim plugin was available before, so the only option was the vim plugin which isn't great. Yeah onivim2 is literally a rip off now. And shouldn't be further developed there's no gain from buying it.
@@nobytes2 neovim plugin is available for quite some time now
@@pawebis4656 right, Vscode been around for 5 years, neovim plugin for less than 1. It wasn't available for early on users.
How about this for windows?
How do you get nice sytem stray wifi icon and etc? is that custom one?
Yea it's a custom polybar config, you can find it on my github in my archrice repo.
Hi Chris. I set up everything, but I am having trouble with the keybindings. The keybindings like jk for Esc doesn't work. Also, the leader key activates which key but shows keys different to nvim which key. I added the utils folder and the 2 files in vscode_config. But do we need to source it in VSCode somehow?
Read this. github.com/asvetliakov/vscode-neovim/blob/master/README.md
thank you
Thank you for the video.
Would you kindly make an update to this using nvim lua config ?
Or even better, can you make a git repo includes all that's required to install this and get it working like lunarvim
Thank you for your amazing work.
I am not able to find where to put the settings.vim file in my windows machine for VSCode
I followed the docs (vscode-neovim) to get jk or jj to work as escape but when in vscodium it doesn't work. I added it to utils/vscode_config/keybindings.json. I Looked at your keybindings and I don't see jk or jj being used. I know you are not a fan of the escape key from your mappings file but how are you switching to normal mode from insert mode in vscodium?
Does anyone have the config files that were used in the video? The links are broken and I cannot find it anymore :(
Hi, where can I find config files from this video? Git repo seems to be changed.
Thank you bro
Hello Chris, I cannot longer find your repository of neovim in Github. Greetings from south of Brazil.
hello what is the name of the font that you are using in VSCode ?
I think it's jetbrains mono
@@chrisatmachine doesn't look like it tbh, brackets are way more rounded in jbmono
I'm getting an error `E117 Unknown function: Comment` . I tried running `call Comment()` from neovim commandline and got the same error.
I also have been using your configs as my nvim setup, and it's amazing, cannot Thank you enough, one thing though I tried to modify but could not, which is auto pairing, just to clarify what I mean is if I type for example '(', it automatically add ')' next to it, I could not figure out how to disable that, I would appreciate if you could direct to how disable auto pairing
There’s a plug-in in my plugins.vim called autopairs, just delete that plug-in and you should be good.
@@chrisatmachine I already tried that and it did not work :(
@@abdallahalsahhar9511 after deleting did you try :PlugInstall :PlugUpdate ?
@@AyushMandowara_xx7 Yes I tried that, and still not working(i.e. when I type '(', it adds ')' right next to it)
@@abdallahalsahhar9511 I think it's coc auto pairs then
Nice setup!
Hi Chris, what a great video.
Hey I wanted to ask one thing, I use your nvim configuration, however I wanted to ask you if it's possible to change the subject, it's that when I try to open it again the nvim resets everything again :c, thanks, I expect an answer
I like it a lot but it seems that your repo for nvim has disappeared from github. Do you have any link to those settings?
There are updates in the readme, bear with me while I update everything to lua.
im sorry i'm new to your channel but do you have/link me your nvim setup video maybe? thanks
hi ,
i am in win10 and I am very confused about the paths and file location please help
This is AMAZING thank you! Has anyone else run into Tab not switching buffers? When I press tab I get an error that says _command 'vscode-neovim.complete-seletion-cmdline' not found_
incredible video!!! how did you get the keys to be shown on screen??
Settings.vim on your blog is not there , shows 404 error in github
How can your easymotion-next (remapped to n key) does not conflict with jump next (n key) in forward/backward search?
can we have somehow the same style code completion in vscode ? the code completion in vim looks really cool and more practical.
Does anyone have any idea why navigating vertically with j/k with NeoVim and these settings on Mac is 2.5 times slower than on Linux?!
How does this look in 2023?
Cool. Thanks! Do you have a video that talks about navigating back and forth between functions and callers of the functions? Let's say the cursor is on a function, and I like to see a list of places that call this function. Also, say the cursor is on a function, and I like to jump to the implementation of it. There are ctags implementations, but I wonder if there's a plugin that makes it work for python, PHP, javascript, etc.
Activitybar is for puppies 🐶
I couldn't get the 's' easy motion to work. Did I have to do anything extra? How is he just typing 's' in the video and easymotion kicks in?
same, what about the tab function to switch between buffers? I wasn't able to get that either
Hey, man. Thanks for this. Question, can I use lua instead of .vim in neovim init vim paths?
What about intellisense, lsp, diagnostics, linting etc… ? Are you using your nvim config for that or those features come from vs code?
Awesome setup! I'll drop my VSC with the vim extension for your setup :D
Do you know if there is a way to speed up the js / ts language server ?
I tried switching to vim, because I thought VSC was slow, but it turned out that the lang servers were the bottlenecks,
so I went back to VSC with the vim extension :D
Hi Chris. Which window manager are you using in your mac? It looks pretty cool.
This is actually Arch Linux.
@@chrisatmachine Oh, my bad. Got confused by the desktop and wallpaper haha.
Ayush Kumar Shah Actually, there is Yabai Window Manager in MacOS, which emulates a tiling window manager. It is great. The only problem being not having a proper status bar. The whole instructions are on the GitHub of the project
@@sbobadilla thanks. I will check it out.
@@chrisatmachine Wallpaper is exactly what Catalina OS X ships with lol well that wallpaper is interactive it changes with the time of the day.
So which one do you prefer, VSCode or Vim? They both look mighty good.... I would imagine VSCode has more options to customize and the intellisense might be better. How about speed?
BrutusPalmeira I use VSCodium now when writing Java. Neovim for most other things. But honestly at this point I find them pretty interchangeable for my workflow.
Hey Can you do a video about setting up eclim (eclipse fonctionality into vim ) for java programming in vim ?
And a video about devicons on vim .
Thank you
How did u make this vscode conf? I kbow about the vim plugin, but i dont have all of those features
A lot of questions:
How do you get the showing commands at the bottom on the screen?
And it's possible to setup neovim and vscodeVim together?
where should I put the settings.vim if I am using WSL ubuntu?
i am curious, how you can type 'j', 'k' 20x times in one sec? Is that any tricks?
Sean Chen I hold the key down
@@chrisatmachine thanks from an emacs user. lol
I'm doing some coding in school I started using nvim to do it should I continue with nvim or use vscodium (I not ver fluent in either I'm just doing some pascal in my class)
Thank you!
May please anyone share how to configure these neovim tabs like in this video? Is it some plugin or custom change? Also, what color scheme is it?
Go check out his github, he has a repository with his neovim configuration.
@@filipbanak8938 thanks!
thanks a million for such a great video and configs! Btw, does anyone know how to set the Leader key to work with easymotion in terms of this configs from video? Can`t find out the solution for a several days in a row.
did you configure it bro? is it working for you?
@@cebid I'm trying to configure that too
Hey guys, I'm kind of a vim noob here :D I'm trying to follow this tutorial, but I am unable to get vscode (regular vscode) to work correctly. After following the tutorial and getting the vim config from the github repo, I can't fail but notice that there is no init.vim any more. Now there's an init.lua.
Well, if I leave the neovim init empty, it kinda seems to work? but the leader key (space) doesn't seem to properly open whichkey, and if I press CTRL + J or CTRL + K, it's like it changes to some buffer that doesn't exist in vscode.
Long story short, any idea how I can get the functionality described in this (awesome!) video in my own vscode editor, starting from the git repo?
Many thanks!