Neovim - Completion Tutorial 100% Lua

  Рет қаралды 86,023

chris@machine

chris@machine

Күн бұрын

Repos: github.com/LunarVim/Neovim-fr...
SUPPORT THE CHANNEL
💳 Patreon: / chrisatmachine
💰 Paypal: paypal.me/chrisatmachine
👕 Merch: shop.spreadshirt.com/chrisatm...
SOCIAL MEDIA
🕸️ Website: www.chrisatmachine.com
🐦 Twitter: / chrisatmachine
💻 Github: github.com/ChristianChiarulli
📺 Odysee: odysee.com/$/invite/@chrisatm...
💬 Matrix: matrix.to/#/+atmachine:matrix...
📡 Twitch: / chrisatmachine
🔌 Discord: / discord
GET INTO CRYPTO AND SUPPORT THE CHANNEL
🏦 Blockfi: blockfi.com/?ref=732f6bc1
💰 Celcius: celsiusnetwork.app.link/12138...
🪙 Coinbase: www.coinbase.com/join/chiaru_ij
💱 BinanceUS: accounts.binance.us/en/regist...
💸 Voyager: voyager.onelink.me/WNly/refer...
📈 OKCoin: www.okcoin.com/join?channelId...
₿ DONATE CRYPTO
Bitcoin: bc1qlw9t04evwvvlgkwkxf3cm9mfk6zgmy09sp4uja
Ethereum: 0x31202eF4Ce3d03c1B5111Bc388f937e7b17dd164
Litecoin: ltc1qmhxvmr9h3hpc226aeqj9sadwjn3gl0nh5qsvkf
Polkadot: 12pxctmVV3HBKqfpnPbgqznKHdpFbihVENH2VJU6Z5HsaD1S
Chainlink: 0x31202eF4Ce3d03c1B5111Bc388f937e7b17dd164
Bitcoin Cash: qqz56dl270wx04z4x8y42aft39ptpksjuggmel0hz6
XRP: raUaxdWMst1Eb96nACTvJTRWgtmsRQpwHk
Stellar: GD7PCULOCC4DLRJN6TJSWFTETDWL4D6URHXEBFX4B4RJQN4B5T7XZ5AU

Пікірлер: 60
@briainodriscoll
@briainodriscoll 2 жыл бұрын
Thanks for these instructional videos Chris. I enjoy your relaxed approach to doing things in the new Lua way. Much appreciated!
@Pau1danelli
@Pau1danelli 2 жыл бұрын
I'd been struggling to get CMP working for ages until I watched your video and checked out the code in your Repo. Thank you so much for going through this and helping the community. :)
@michaelcarnevale5620
@michaelcarnevale5620 2 жыл бұрын
Your tutorials are great man thanks for this will def help me when I transition to lua vim
@JianClash8
@JianClash8 Жыл бұрын
Thank you very much for the help I have been trying to get cmp working for weeks now and all I needed was this 20min video ❤❤❤
@arionlove1212
@arionlove1212 2 жыл бұрын
Really helpful series, I think everybody should tailor their own config, I believe it makes things more efficient. Only thing that was stopping me was good guideline, all these documentation was too much too read. Thank you chris for the series, been a follower since "VIM as an IDE" video. Keep up the good work
@HernandoFarias
@HernandoFarias 2 жыл бұрын
this is great! thank you for your videos!
@mchess7157
@mchess7157 2 жыл бұрын
Up until this week I've been working on vim. And now I've switched to neovim. I can't even imagine how could I live without it. With this configuration I just love it
@jrdicoll
@jrdicoll 2 жыл бұрын
For anyone having trouble with the documentation, the config has changed, and to get the same window effect, you now must include this code: window = { documentation = cmp.config.window.bordered(), },
@jrdicoll
@jrdicoll 2 жыл бұрын
@@leonardodias213 cmp.lua it should be somewhere around line 130
@rubempacelli6815
@rubempacelli6815 2 жыл бұрын
Amazing video! Keep going!!
@tbyz2572
@tbyz2572 2 жыл бұрын
My nvim enlightenment teacher , thanks
@hemanthkotagiri8865
@hemanthkotagiri8865 2 жыл бұрын
Chris, your collection of wallpapers are so good. Please do upload these latest wallpapers to your repo. Thanks!
@0canten754
@0canten754 2 жыл бұрын
thank you so much, bro!
@cdrh8206
@cdrh8206 2 жыл бұрын
Another amazing tutorial
@itw6034
@itw6034 Жыл бұрын
very helpful series, especially when you just setting nvim up and get bombarded with lot of config
@placebola_
@placebola_ 4 ай бұрын
Perfect mate thanks you
@bartstavenuiter9895
@bartstavenuiter9895 2 жыл бұрын
hi chris. Love this tutorial, it was exactly what I was also doing, except i get mangling with the old normal vim configuration etc. Now i'm using neovim lua setup only. Got one question about the completion. How do you handle embedded languages in another filetype, like js and css in a html file or php file? Omnicompletion still works there, but lsp can give so much more. Any idea?
@javalace
@javalace 2 жыл бұрын
I have a dumb question, in regards to mappings, when using a macbook there is no ALT key, hence I tried the option key, however the result was not what I expected (of course) however I'm struggling to find documentation as to how to do the mappings to the 'option hjkl' (the equivalent to inoremap on vim. Any ideas of where I can find those? Needles to say your series of neovim from the scratch are 'pure gold' for those of us looking to move towards (n)vim as an ide. Keep the great work and thanks!
@javalace
@javalace 2 жыл бұрын
after a bit of struggling and reading found part of the answer (now I'm left struggling with the resize using the arrows) -- Visual Block -- -- Move text up and down keymap("x", "J", ":move '>+1gv-gv", opts) keymap("x", "K", ":move '
@williambillemeyling5647
@williambillemeyling5647 2 жыл бұрын
Hey I think it would be nice if you included "Neovim from scratch" in the title of these videos to make it easier for people to recognize. And also I think a lot of people are looking for lua-based neovim tutorial series so I could lead to more views. Ex. "Completion Tutorial 100% Lua | Neovim From Scratch ep. 6" :)
@bamboowoo7928
@bamboowoo7928 2 жыл бұрын
I am converting from emacs to neovim. It's pretty hard whtiout those videos, thank you!
@stephaneislistening6103
@stephaneislistening6103 2 жыл бұрын
Any way to order the kinds in LSP ? I'd like to have my variable and method names first on top.
@donovanjones3673
@donovanjones3673 2 жыл бұрын
How do I select the second option in a snippet that offers multiple options when using luasnip? Read a bunch of docs but don't see it mentioned
@MajorJackass
@MajorJackass 2 жыл бұрын
Thanks for your tutorials! I am going through them and they are great in helping transitioning from vim to neovim (with all the extra plugins). I am following this video for the completion and I am getting it working with your config, however, each completion appears 4 times in the list (duplicates). I'm not sure why this would be happening, would you happen to have any tips / ideas? Thanks again
@MajorJackass
@MajorJackass 2 жыл бұрын
For some reason, my initial reply is not appearing... In any case, it was to summarise that it seems to be linked to using `vim-plug` - when I removed `Plug cmp_luasnip` & `Plug friendly-snippets` (after they had already been installed) and it worked as expected (showing just 1 suggestion instead of 4 of the same...). I switched to `Packer` and it is working as expected. This is just to let anybody else know if they are running into this. Thanks!
@XxdaftnemesisxX
@XxdaftnemesisxX 2 жыл бұрын
Hey, great tutorial, i'm loving it, but i have a question, how to autocomplete html tags in a jsx file?
@chrisatmachine
@chrisatmachine 2 жыл бұрын
look up ts autotag, I think it's in my nvim config on my github.
@Sra4825
@Sra4825 Ай бұрын
ctrl + y is the default accept mapping for vim and neovim.
@reverseila4363
@reverseila4363 2 жыл бұрын
For your future nerd font video, could you show an example of how to patch a font?
@robertojunior6672
@robertojunior6672 Жыл бұрын
when youre mapping and you use "i" and "s", what they mean ?
@fidelfs
@fidelfs 2 жыл бұрын
I am new to Lua, so everything is new for me. I am having problem to autocomplete for python. I installed pynvim as you suggested, but I am having issues. Let's say I have test.py. If i enter im I see the snippet and select import then I try to enter for example pandas. No autocomletion. Is that normal? or am I doing something wrong.
@williambillemeyling5647
@williambillemeyling5647 2 жыл бұрын
When I press ctrl-n in insert mode and nvim-cmp does not have any suggestions then it seems that I get completions from neovim directly (at least it is not the same interface as nvim-cmp). More specifically I get a message saying "-- Keyword completion (^N^P) match 1 of 45", and a dropdown menu with all buffer symbols (but it is not nvim-cmp formatted). Does anyone know why and how to possibly disable it?
@returned_to_monke8872
@returned_to_monke8872 2 жыл бұрын
Yeah I'm also getting this behavior. Apparently it's the default vim and neovim behavior. I don't know why chris wasn't getting it :(
@kikocastroneto
@kikocastroneto 2 ай бұрын
For people having issues after packer installs the plugins from completion branch: My WSL environment (Ubuntu) had Neovim release 0.6. I follow along other tutorial video (kzbin.info/www/bejne/aKjEoaupm99_ntE) to download, extract and create a symbolic link to latest nvim release, and now it is working
@gadefox
@gadefox Жыл бұрын
I've got few questions: 1) stylua vs lua-format: What's the diff. and which one is better? selene vs sumneko-lua: What's the diff. and which one is better? Ta
@chrisatmachine
@chrisatmachine Жыл бұрын
stylua is better supported afaik, sumneko is a full blown language server with completions, inlay hints, diagnostics etc.. selene is just a linter/diagnostics tool
@josefvanniekerk9658
@josefvanniekerk9658 2 жыл бұрын
After taking the steps in this video, it seems the only file type I'm getting completion for is for .lua, is this correct? I tried some completion in .html and .js, but I don't even get buffer completion there.
@josefvanniekerk9658
@josefvanniekerk9658 2 жыл бұрын
Found the issue, it was relating to the loading order of my files. In init.lua, I wrote a small script to load my .lua files and plugins was accidentally loaded last. Make sure you load your packer script first.
@gunnerjoe53
@gunnerjoe53 Жыл бұрын
Hello, Still having issues with this plugin. When editing a file I'll get the following error at bottom of the terminal: cmp.lua:78: attempt to index global 'kind_icons' (a nil value) Not sure what that is about, any ideas? Thanks, Joe
@gunnerjoe53
@gunnerjoe53 Жыл бұрын
Commented out the vim_item.kind and completion is working now. I'm guessing I don't have something installed correctly for the kind_icons to work properly. Ideas? Thanks, Joe
@wormholecowboy
@wormholecowboy Жыл бұрын
Does anyone know how to get cmp for random node modules from npm?
@beastOfVengeance
@beastOfVengeance Жыл бұрын
is there any feature to disable ghost texts while writing comments....?
@harshwardhanshetty4683
@harshwardhanshetty4683 Жыл бұрын
things like C-space and Ctrl-j arent working is this key mapping problem
@r-iliass9587
@r-iliass9587 2 жыл бұрын
@hanspetervollhorst1
@hanspetervollhorst1 Жыл бұрын
omg, ORG-MODE for vim? todalooo
@0canten754
@0canten754 2 жыл бұрын
hey bro, all icons in cmp.lua and handlers.lua are incorrect format on your git repo. Can you help me to copy that for my config? Thank you so much!
@brachysm
@brachysm 2 жыл бұрын
my too, icons don't quite right in my machine.
@brachysm
@brachysm 2 жыл бұрын
me too, icons don't look quite right in my machine.
@0canten754
@0canten754 2 жыл бұрын
@@brachysm I solved. You have to install nertfont
@brachysm
@brachysm 2 жыл бұрын
@@0canten754 yeah, I found that Christian make a video about it. kzbin.info/www/bejne/nIOXhZuOr82Ej6s I followed and downloaded nerd-fonts complete version, but nvim still doesn't show some icons right.
@WarusBrian
@WarusBrian 2 жыл бұрын
@@brachysm Hey man not sure if you have fixed it yet. But you gotta make sure that your terminal is acutally using the installed nerd font. Hope that solves it for you!
@robertojunior6672
@robertojunior6672 Жыл бұрын
this kind_icons doesnt render on my terminal ;s
@ArnasBies
@ArnasBies Жыл бұрын
same, have you figured out a fix?
@josefvanniekerk9658
@josefvanniekerk9658 2 жыл бұрын
I'm getting an error 'Failed to install hrsh7th/cmd-cmdline' when running ':PackerSync', not sure why.
@josefvanniekerk9658
@josefvanniekerk9658 2 жыл бұрын
I really need to sleep more, it's 'hrsh7th/cmp-cmdline' NOT 'hrsh7th/cmd-cmdline'.
@patricorgi
@patricorgi 5 ай бұрын
3:19 fu is not good (just kidding)
Neovim - Treesitter Syntax Highlighting
14:54
chris@machine
Рет қаралды 77 М.
Вечный ДВИГАТЕЛЬ!⚙️ #shorts
00:27
Гараж 54
Рет қаралды 14 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 10 МЛН
Haha😂 Power💪 #trending #funny #viral #shorts
00:18
Reaction Station TV
Рет қаралды 16 МЛН
I tried Neovim Distributions so you don't have to
9:12
typecraft
Рет қаралды 142 М.
Which PLUGIN IS THE BEST for Neovim/Git? (PRACTICAL EXAMPLES included)
8:32
TakeTuesday E01: nvim-cmp
30:42
TJ DeVries
Рет қаралды 61 М.
Настраиваем свой конфиг для NeoVim на Lua
52:17
PurpleSchool | Anton Larichev
Рет қаралды 34 М.
Why Neovim nerds are so obsessed with the terminal
6:44
Joshua Morony
Рет қаралды 79 М.
Vim as your editor - Advanced Motions P2
12:48
ThePrimeagen
Рет қаралды 168 М.
30 Vim commands you NEED TO KNOW (in just 10 minutes)
10:27
typecraft
Рет қаралды 69 М.
The Best Editor
11:03
Chris Titus Tech
Рет қаралды 100 М.
Why oil.nvim is the best directory plugin
9:12
Andrew Courter
Рет қаралды 23 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,2 МЛН
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,3 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,6 МЛН