Another week, another plugin manager for vim...

This one is written in and makes use of newly-added features... but is it worth the time to switch? VimPlug works just fine...

I actually tried out Packer and converted my neovim-only plugins from Plugger to Packer. It's not bad!

Until replaces the classic in most Linux distros, I want my .vimrc to work on both, so I am not going to convert everything to Lua.

And so I ended up with two competing plugin managers in my text editor 😅

Next, after freaking out at coq.nvim's complexity (it needs python3-venv and sqlite), I installed vim-cmp, which is entirely written in , and thus doesn't require compiling:

One thing I didn't initially understand is that 's built-in LSP client isn't enough to get autocmpletion!

First, you need to configure which Language Server should be spawned for each file type you open. For this, there's nvim-lspconfig, which is maintained by the Neovim devs as a separate project:

But wait! The LSP configuration needs to be configured... in Lua, of course! And don't forget to define some mappings for "Go To Definition" etc...

Do we have completion yet? Not so fast!

You see, has builtin completion, but what you really want for programming is *autocompletion*, which requires an external plugin:

It says nvim-cmp is the recommended plugin, so it will be easy to integrate, right?

Easy peasy! My nvim-cmp configuration is only... 73 lines of config!

I copy-pasted most of the config, and when it breaks I'm not quite sure how to debug it.

In fact, it's not working right now. If I open a Rust project and start typing, I get plenty of useless snippets instead of the semantic completion. I see rust-analyzer running and eating CPU time... I even see inline errors... so why?

Why do I have to learn before I can code in ?

WHYYYY?!?! 😩

Hey, it seems I gave up too fast!

My semantic completions were already in the menu, just BELOW the useless snippets...

I guess I just I need to tweak my config to reorder them... and also use TAB to complete (instead of Enter)...

...and also figure out how to theme the menu so I don't get flashes of shocking pink while I'm trying to focus on the code 😂

@codewiz maybe you already know, but to tweak the order of completions you can use priority or just order sources as you want them. I chose the latter:

I also moved recently to neovim (I think about 3 week ago), and I don't know lua (yet!) but I decided to full switch, so my conf is only lua.
@codewiz please feel free to take a look if it can help you:

Ignore the ansible layer on top, it's only because I have more than one machine were I want my stuff and all the other systems I tried (from pure git of the HOME to handcrafted Makefile, to home management software) did not worked well at the end.

@eriol Thank you so much for sharing!

In spite of all the sarcasm, I _do_ believe that is on the right path... we need to get rid of the awful VimL and give plugin writers a solid base to work on.

Perhaps better integration will come in time... but we also need the developers to pick good defaults to avoid the paradox of choice.

@codewiz I fully agree with you on VimL, and I also hope that we will avoid the paradox of choice. It can be fun configure you editor but maybe you just want to use it!
Maybe as showed by [email protected] the way is to provide ready to go configs... I really don't know.

@eriol @srevinsaju It's the oh-my-zsh way... a pre-baked, well maintained, extensible config with reasonable defaults.

· · Web · 0 · 0 · 2
Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!