I’m thinking of switching from VSC to VIM because VSC is too heavy in term of ressources usage.

Currently, I use the VSC + VIM extension and I’m pretty happy.

But nowadays, I avoid to open some monorepo projects because it takes too much time and I use the Github explorer instead. Also, I use the mouse too much.

So I finally took the decision to give a try to Neovim.

I initially started with SpaceVIM and it was a good experience. But there is too much magic for me. Also, I have the feeling to not learn VIM.

So I setup CoC with VIM-plug + NerdTree. It looks promising.

Do you have any tips for me?

  • simonced@lemmy.one
    link
    fedilink
    arrow-up
    9
    ·
    1 year ago

    Hi there, glad to see new users. I would recommend using LSP instead of Coc if your language is supported. A good starting point could be with Lsp-Zero plugin, it can be used with some dependencies and you can customize to your liking. A bit of a steep learning curve maybe, but the result is worth the effort. Also, using Packer for plugin management might be a good alternative, and learning lua in the process. I finally converted my vim config into Lua, I can send a link to my repo if you want to take some inspiration.

    • zlatko
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I agree, there are several good starting points. But I think it’s more important what the OP said about his understanding of it. I think this is a lot more important - WHY do you use plugins, HOW they help you, WHAT can they do. Like, autoimport like vscode does? Autohighlight problems? Check. Check. Autofix linting issues? Check. Find files? Check. Search the project? Check. There’s a lot of things that can make your experience way better. Look up some videos. E.g. this one (if you can ignore some twitch memes, I found them mostly fun or tolerable).

      Also, when you give up on vim, come back again. It’s something that can take many iterations to really “get”. Even if things don’t work out, try again in a few years.

      Also, as an alternative to VSCode, try some native editor. I personally used sublime - for weak machines, it’s way better on resources then VSCode and it’s electron baggage.

    • madeindjs@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      I might want to see your repo for sure !

      Is it better to use Lua for the config ? I feel Vimscript is kinda old school way but there is more ressource on the internet.

      Also, why do you recommend LSP instead of CoC ?

      • hisbaan@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Not op; I don’t use LSPZero but the built in support with lsp-installer. I like to think I’ve organized my repo decently well so hopefully it can help you out: repo

        I used to use CoC a looong time ago so I don’t know if this has changed since but I’ve heard LSP is faster than CoC and has better support since it’s the defacto standard for neovim (and built in). Additionally it uses the same binaries used by something like vscode for the analysis so it’s part of a larger ecosystem that will get support

      • simonced@lemmy.one
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Sorry for my late answer.

        Here is the link to my dotfile:
        https://gitlab.com/simonced/dotfiles-nvim

        I used Vim before NeoVim and despite not liking VimL as a language, the basic Vim configuration was better than doing it with Lua IMO.
        But I got used to it, and it’s not bad after all.
        The thing though, when learning Vim, the commands, the motions, the settings… learning Lua on top of that can be daunting.

        About LSP vs CoC.
        CoC was a pain in the neck to setup, I needed python and other stuff (if I recall correctly) and it didn’t work as I wanted/expected. LSP-zero works almost out of the box, and Mason (optional but recommended) will install LSP for the languages you want. It’s very convenient and I use LSP everyday now, and it’s a very nice programming experience.