Setting up (Neo)vim for C++: An IDE like experience with coc!

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

ความคิดเห็น • 62

  • @firstnamelastname7396
    @firstnamelastname7396 4 ปีที่แล้ว +37

    Great video. It's surprisingly hard to find good vim configs for c/c++

  • @diegomora997
    @diegomora997 2 ปีที่แล้ว +1

    Thank you man, just switched to linux and it's been hard, but tutorials like this really help.

  • @herbertwestiron
    @herbertwestiron 4 ปีที่แล้ว +3

    Thanks for the video. Usually vim setup videos are outdated or just plain bad but this one actually helped. I was only using clangd before but now with ccls it works like charm.

  • @kimikids9130
    @kimikids9130 3 ปีที่แล้ว +1

    Seriously amazing! When you are familiar with VIM and then somehow you were forced to use other text editors, it feels like driving with your legs while your hands are tied behind your back.

  • @zzzengineer
    @zzzengineer 3 ปีที่แล้ว +2

    Thanks for the great video! I recommend changing the renaming from rn to re, as it makes the renaming much faster

  • @daereanlegrand2471
    @daereanlegrand2471 3 ปีที่แล้ว

    Thank you!!, I had some problems doing it myself 'til I found your video.

  • @ricojia7322
    @ricojia7322 3 ปีที่แล้ว

    GREAT GREAT VIDEO, Like others have said, it's hard to find a video for coc setup like this!

  • @dwolrdcojp
    @dwolrdcojp 3 ปีที่แล้ว

    Thanks. Took a bit of troubleshooting to get it work on my setup but it works now.

  • @omaraymanbakr3664
    @omaraymanbakr3664 ปีที่แล้ว

    great channel, can you make a video about the road map you took to reach this level. I have landed over one of your videos about neovim configuration and there is a ton of new stuff for me to catch on but I couldn't figure out where to start. THANK YOU in advance :)

  • @lenam317
    @lenam317 3 ปีที่แล้ว

    Thanks you. Your video is amazing, concise and right to the point

  • @filiplobpreis2734
    @filiplobpreis2734 3 ปีที่แล้ว

    The best video helped to solve all of my problems

  • @agentzhao
    @agentzhao 3 ปีที่แล้ว

    6:33 hi! how did you configure your shell to show prediction of files?

  • @googiek9351
    @googiek9351 4 ปีที่แล้ว

    Great job, no bla bla, crisp!, thanks, keep it up, subscribed

  • @hugo_dev
    @hugo_dev 3 ปีที่แล้ว

    help! my ccls cannot recognize the headers files like iostream in cpp. I've tried to include .ccls in the root project but it did't work. Are there any ways to fix this?

  • @miaomiao1415
    @miaomiao1415 3 ปีที่แล้ว +1

    I almost step in youcompleteme , step out now for CoC ...thank you Sir!

  • @artempest7137
    @artempest7137 2 หลายเดือนก่อน

    Thank you so much for the tutorial 😃

  • @phelixwer
    @phelixwer 3 ปีที่แล้ว

    Thanks so much!! This helpmed me a lot

  • @张正-s5v
    @张正-s5v 3 ปีที่แล้ว

    thank for the c++ vedio series and i also have a question about coc ccls...why it keep indexing after i creat .ccls or compile_commands.json...

  • @thomasbake
    @thomasbake 3 ปีที่แล้ว

    Hey great video! That's just what I needed! I was wondering what setup (I mean the status line below) you have for Neovim or your terminal... I have seen it many times in youtube but don't actually know how to adapt it (maybe it's the setup of manjaro?).
    Thanks!

  • @71GA
    @71GA 3 ปีที่แล้ว

    SHIFT + k also shows comments above the functions in your case. In my case it doesn't. Which plugin you use for this? I was testing it with C and not C++.

  • @yanasitta
    @yanasitta ปีที่แล้ว

    This is the only situation in which I will ever say I like coc.

  • @Skiggles
    @Skiggles 2 ปีที่แล้ว

    Installed ccls with pacman but it just throws an error when opening a c++ file: ccls failed to start invalid params of intialize: expected array for Workspacefolders. Any ideas?

    • @nobugaming
      @nobugaming ปีที่แล้ว

      don't create the cpp file in the home folder, instead use something like ~/code/test.cpp

  • @eralperat4573
    @eralperat4573 3 ปีที่แล้ว +1

    Can you share your vim config ?Thanks

  • @itayalmoznino5192
    @itayalmoznino5192 3 ปีที่แล้ว +2

    If anyone is getting a "[coc.nvim] node is not executable" error you need to install node.js

    • @shuysnoopy
      @shuysnoopy 3 ปีที่แล้ว

      you can install node.js to prevent the warning. Yes its an warning not an error, since coc was implemented for node.js as default

  • @yookeunsik
    @yookeunsik 3 ปีที่แล้ว

    good video. how to rename symbols in all files not just on buffer?

  • @phpostrich
    @phpostrich 2 ปีที่แล้ว

    Any ideas on how to get this working on windows?

  • @Chaivakz
    @Chaivakz 3 ปีที่แล้ว

    [coc.nvim] Server languageserver.ccls failed to start: Error: invalid params of
    initialize: expected array for /workspaceFolders
    Unfortunately this error keeps occurring. I'm using Ubuntu have I not built the ccls correctly?

    • @rad5105
      @rad5105 2 ปีที่แล้ว

      Did you fix it?

  • @carsonholloway
    @carsonholloway 3 ปีที่แล้ว

    I like your vi font. What's it called?

  • @AhmadFudl
    @AhmadFudl 3 ปีที่แล้ว

    thanks so much for the video
    ❤️❤️❤️❤️❤️

  • @godzilla5941
    @godzilla5941 4 ปีที่แล้ว +2

    That sounds like a blue mechanical switch there

    • @kandodev
      @kandodev  4 ปีที่แล้ว +1

      Yup. Low profile blues. I can do some noise reduction if they're too distracting?

    • @godzilla5941
      @godzilla5941 4 ปีที่แล้ว +1

      @@kandodev Nah they are satisfying just keep you mic on near your mouth on the top

  • @srenh-p3798
    @srenh-p3798 4 ปีที่แล้ว

    Cool stuff. When I do K (show documentation) I get a very big float window. E.g. if I do it on a function it will have "### function function_name
    --- return value --- function signature". You only get the single line showing the signature. Did you configure something in coc to get this simpler description? I am using clangd btw.

    • @kandodev
      @kandodev  4 ปีที่แล้ว

      Nope, that's the default behavior for the neovim nightly version I'm using. Maybe that's the difference?

  • @jensmalzer6344
    @jensmalzer6344 2 ปีที่แล้ว

    is there a way to type the .ccls code so that i never have to type it again? i keep having to put it in each file i make

    • @kandodev
      @kandodev  2 ปีที่แล้ว

      Put it in the root folder of your git repo. It should get picked up automatically

  • @frosty7674
    @frosty7674 2 ปีที่แล้ว

    There is a linux terminal emulator named "Debian" on Microsoft Store, can I use that to setup this?

    • @jensmalzer6344
      @jensmalzer6344 2 ปีที่แล้ว

      i used ubuntu wsl and it worked for me

  • @meenturt
    @meenturt 4 ปีที่แล้ว

    Thanks for sharing this video.

  • @nyanlauncher7350
    @nyanlauncher7350 3 ปีที่แล้ว

    I'm very new and i have no idea how is should learn neo vim and i'm using windows

  • @sandeshgaikwad3216
    @sandeshgaikwad3216 4 ปีที่แล้ว +1

    .ccls not working for me
    I am still getting error in other files

    • @kandodev
      @kandodev  4 ปีที่แล้ว

      Hi, check out part 2 of this video for how to do multiple files.

    • @mizel_almizel
      @mizel_almizel 3 ปีที่แล้ว

      @@kandodev me too .ccls not working for me i use nvim please help i got errer ([coc.nvim] build/index.js not found, please compile coc.nvim by: npm run bulid) what was that !?

  • @henninb
    @henninb 4 ปีที่แล้ว

    I like having these features available in my favorite editor.

  • @skyveil
    @skyveil 3 ปีที่แล้ว +1

    please make more videos like this

  • @godzilla5941
    @godzilla5941 4 ปีที่แล้ว

    When i copy paste a sample case i don't see the spaces and the texts don't get pasted in a new line
    For example if i copy : 1
    1111
    111111
    and paste this on neovim get 11111111111 as the pasted text
    PLZ HELLPP (Basically I cant past properly in the terminal )

    • @kandodev
      @kandodev  4 ปีที่แล้ว

      Try :set paste in vim to enter paste mode in vim before pasting. That should preserve white spaces properly

    • @godzilla5941
      @godzilla5941 4 ปีที่แล้ว

      @@kandodev It is still not working :( plz add the required modification according to you in my init.vim file
      github.com/itsameaditya/my_vimrc_config
      YOU can see i have "set pastetoggle=" in my init.vim but still the input comes in one single line
      The problem is that it is not working in the terminal mode and hence i cannot copy paste test cases in the desired indentation

  • @vrep393
    @vrep393 4 ปีที่แล้ว

    Thanks for the setup.

    • @kandodev
      @kandodev  4 ปีที่แล้ว

      It might be the additional use of the floaterm plugin. Try that out and install :CocInstall coc-floaterm and let me know if that works.

    • @vrep393
      @vrep393 4 ปีที่แล้ว +1

      @@kandodev Actually all i had to do was update the pluggins. Apparently i was using the old version of coc. Plug Update fixed the problem . But coc-rename seems to work only on opened buffers. Say u have 100 files that need to be modified, it is impractical to open all the files. Still really skeptical whether I should go all in coc. I think your tutorials is really helpful. Keep up the good work.

  • @md.shahid5763
    @md.shahid5763 4 ปีที่แล้ว

    if you want to compile or run c/c++ program (indeed any programming language) in your vim/neovim
    then use [ github.com/shaeinst/lazy-builder ]
    i made this simple/dummy script to make my work easy.

    • @kandodev
      @kandodev  4 ปีที่แล้ว +1

      That's a nice setup but doesn't scale well for more complicated programs. I have a setup around CMake for my C++ build/run process that I'll be sharing in future videos. Thanks for the comment!

  • @Awwe12675
    @Awwe12675 3 ปีที่แล้ว

    Nice job I love it

  • @alvarogallo208
    @alvarogallo208 4 ปีที่แล้ว

    Thank you !!

  • @eddyecko94
    @eddyecko94 4 ปีที่แล้ว

    Brilliant

  • @Neophage
    @Neophage 2 ปีที่แล้ว +1

    An unfortunate name, but alas, nice coc!

  • @cliffmathew
    @cliffmathew ปีที่แล้ว

    Thank you