C, C++, obj-c Intellisense and autocomplete setup in Vim (Coc, ccls, bear, compile commands)

Поделиться
HTML-код
  • Опубликовано: 16 дек 2024

Комментарии • 54

  • @lactealik3
    @lactealik3 2 года назад +5

    you're a life saver, ty so much, my clangd was complaining way too much with c++20 libs. ty ty

    • @MikeShah
      @MikeShah  2 года назад +1

      Cheers, glad to help!

  • @saitamapreetsingh3057
    @saitamapreetsingh3057 2 года назад +8

    Clean and really understandable tutorial. Thank you Mr. Shah, great tutorial !

    • @MikeShah
      @MikeShah  2 года назад

      You are most welcome!

  • @nikholaslopez4383
    @nikholaslopez4383 2 года назад +5

    To put it as delicately as I can, this video is just fucking brilliant. Bravo sir 👏🏻👏🏻👏🏻

  • @IsusVonBier
    @IsusVonBier 2 года назад +8

    Check neovim with lua config, also neovim lsp

  • @gusdev-g2c
    @gusdev-g2c 12 дней назад +1

    Hello, why do you configure the json? If on the coc-clangd page it mentions that if you install the extension it is not necessary?

    • @MikeShah
      @MikeShah  12 дней назад +1

      Seems I had to do the configuration to get things working, but perhaps in the past year or two that has been resolved. I hope it is now as simple as just installing :)

  • @nematjonabdulloev3568
    @nematjonabdulloev3568 Год назад +1

    This video is really helpful. I finally can code in vim without any problem.

  • @yachint1570
    @yachint1570 2 года назад

    Thanks a lot for this video! Helped me out to get vim up and running for C++ development.

    • @MikeShah
      @MikeShah  2 года назад

      Awesome! You are most welcome!

  • @samuelhenrique6045
    @samuelhenrique6045 8 месяцев назад +1

    Muito obrigado, ganhou um novo inscrito. Comecei a usar o vim agora e estava à semanas sofrendo tentando resolver esse problema de reconhecer bibliotecas como gtk. Eu uso o vim com plugin ALE e o banco clangd.

    • @MikeShah
      @MikeShah  8 месяцев назад

      You are most welcome! Welcome to the channel!

  • @animatedsilicon9670
    @animatedsilicon9670 2 года назад +2

    16:03 "Bear with me" couldn't possibly have been a coincidence.

  • @SNTASCND
    @SNTASCND 2 года назад +2

    Thanks very well done!!!, I managed to do it on Mac using Clangd instead of Ccls, I installed Bear with home-brew and the version is Ok.

  • @moviesynopsis001
    @moviesynopsis001 Год назад

    how come when i type #include it doesnt autocomplete like yours, but when i do iostream it does?

  • @1873Winchester
    @1873Winchester Год назад +1

    I'm here looking at vim after failing to get emacs auto-completion working (maybe I'm stupid, but I found the documentation lacking and confusing, particularly for irony-mode). I just want something that approximates how sublime text works. I'd buy it, or switch to VSCode, but both of these feels like cheating when I'm trying to learn the nitty gritty. So far emacs made me feel stupid. I guess it doesn't help I'm running WSL/debian and not real linux so some stuff might not work as expected.
    Your video makes vim look a lot easier!

  • @JayPatel-ce4jp
    @JayPatel-ce4jp Год назад

    do I always have to use bear to build? what if I wanted use Makefiles

    • @MikeShah
      @MikeShah  Год назад +1

      I believe you can use 'bear make' or other build tools alongside.

    • @JayPatel-ce4jp
      @JayPatel-ce4jp Год назад +1

      @@MikeShah hey thanks for the response, but yeah you’re right you can just do bear make

    • @MikeShah
      @MikeShah  Год назад

      @@JayPatel-ce4jp Cheers!

  • @janise237
    @janise237 2 года назад +1

    Thanks a lot for the very useful video!

  • @Awwe12675
    @Awwe12675 2 года назад

    Hi how to control autocomplete?
    When I press character it’s open many lines
    I need just 5 lines showing how to configure that
    Sorry for my bad English I hope u understand what I mean

  • @dibyojyotibhattacherjee897
    @dibyojyotibhattacherjee897 2 года назад +2

    Hey man, what about taking a lot at emacs...

    • @MikeShah
      @MikeShah  2 года назад

      I haven't used emacs in a long time unfortunately. Perhaps in the future I can brush up.

    • @dibyojyotibhattacherjee897
      @dibyojyotibhattacherjee897 2 года назад

      @@MikeShah Ye sure, emacs a has a hell lot upgraded and setting up autocomplete is pretty easy in emacs...

    • @MikeShah
      @MikeShah  2 года назад

      @@dibyojyotibhattacherjee897 Is intellisense built in by default with emacs? Vim has autocomplete with ctrl+p and ctrl+n which is decent.

    • @dibyojyotibhattacherjee897
      @dibyojyotibhattacherjee897 2 года назад +1

      @@MikeShah no the basic plugin is company mode or auto complete which is pretty basic...

    • @MikeShah
      @MikeShah  2 года назад

      @@dibyojyotibhattacherjee897 Understood. I imagine similar steps are needed in emacs to get things up and running then.

  • @jagos3681
    @jagos3681 2 года назад

    Hi I'm using windows and followed step by step until the end of 'vimrc for conquer of completion chapter' when it started to autocomplete for you and it's just not working for me, no errors show up, when I try to write some code it doesn't auto complete and when I make an error it doesn't show up for me.
    Any way you can help? Thanks a lot!

    • @shrek1412
      @shrek1412 2 года назад

      I got the same issue, not sure how come he installed COC only and it already had syntax errror checking at 6:03 (at that time, extension is not installed)

  • @polideo
    @polideo 2 года назад

    i'm getting this error though
    [coc.nvim] Server languageserver.ccls failed to start: Error: invalid params of initialize: expected array for /workspaceFolders
    could help me get past this? This happened after I edit my CocConfig

    • @MikeShah
      @MikeShah  2 года назад

      Hmm, my recommendation is to start from scratch and try to run again. It looks like you're maybe running from neovim instead of plain vim, so their may be something subtle changing here.

  • @054-manikandabharathi.t5
    @054-manikandabharathi.t5 Год назад

    how to select? for me its shows [A]

  • @longkhanh8641
    @longkhanh8641 2 года назад +1

    How can I install 'bear' on windows?

    • @MikeShah
      @MikeShah  2 года назад

      Bear appears to be on Linux github.com/rizsotto/Bear -- you may be able to build it from source using mingw or some equivalent compiler and try it.

  • @radman999
    @radman999 2 года назад +1

    Just curious, but why not just use VSCode? Am I a noob for thinking that way?

    • @MikeShah
      @MikeShah  2 года назад +2

      Vim is my preferred environment because I can use it everywhere (I often have to ssh into remote locations).
      Use whatever tool you are most productive in. A pure text-based editor (vim, emacs, nano) is worth trying at some point though to see if you're more productive!

  • @jugalshah8199
    @jugalshah8199 2 года назад +1

    This will same for macos?

    • @MikeShah
      @MikeShah  2 года назад

      Should be a similar process to setup!

  • @cozycactus
    @cozycactus 2 года назад

    Nice video! What windows management tool you have? I like how you move and resize windows. Is it built-in in ubuntu?

    • @MikeShah
      @MikeShah  2 года назад

      Yup, built into Ubuntu! :)

  • @wawelkrol6887
    @wawelkrol6887 2 года назад +1

    Very nice.

    • @MikeShah
      @MikeShah  2 года назад +1

      Thank you for the kind words!

  • @Am-pe4iy
    @Am-pe4iy 2 года назад +2

    As emcaser this video is a poor attempt to make me join the dark side

    • @MikeShah
      @MikeShah  2 года назад

      Sorry to hear! I haven't used emacs in a long time to properly compare & contrast each in regards to intellisense.

    • @Am-pe4iy
      @Am-pe4iy 2 года назад +1

      @@MikeShah I was just making a joke. Your channel is probably one of the few channels worth watching.

    • @MikeShah
      @MikeShah  2 года назад

      @@Am-pe4iy Thank you for the kind words! More Vim coming :p