News for hackers. Stuff that matters.
Re:LazyVim by TonyStr on Monday July 17, 2023 @01:36AM (#36754521)
Did you try LazyVim or any other neovim distro? Seems like you're complaining about configuring neovim from scratch, which is that pain that neovim distros aim to remove
Re:LazyVim by danjac on Monday July 17, 2023 @01:38AM (#36754537)
Yes I did. And they work fine, until you need to do that one thing (e.g. "Set up Black to format on save"). Now you are back in that world of pain of figuring out which plugin needs to be installed/configured, only now you are figuring out someone else's way of doing it.
Re:LazyVim by ipaddr on Monday July 17, 2023 @02:03AM (#36754662)
Have you asked chatgpt?
Re:LazyVim by JackJackJam on Monday July 17, 2023 @02:06AM (#36754675)
LazyVim gives you Mason to install Black. You could use :MasonInstall black and restart Nvim to ensure black is loaded.

Or if you want to have it automatically available on other setups, black is a builtin formatter in Null-LS, so you would just have to add "black" to your builtin list for your Null-LS configuration.

Format on save is already set up.

I've not used LazyVim. It took me 30seconds to look at the docs to see what was available. Yes, getting to the point where you have Mason, NullLS and LspConfig and the glue-plugins to make them work well together takes more than 30-seconds to set up, but once it is adding a new LSP or formatter takes no time at all.

Re:LazyVim by shriek on Monday July 17, 2023 @03:47AM (#36755270)
I think you're going about the wrong way if you're reaching to plugin for every simple thing in vim. Granted, I will say that vim has steep learning curve, it kinda gives you the power to do your _own_ way which is probably why you're seeing people do their own way. Also, you sort-of have to shift your mindset to embrace unix/shell as your IDE. But definitely reach out to other tools if it's not your cup of tea. Like many others have said, if you're trying to force it into something it's not then you're going to have a miserable time.

As for your e.g. it would be a simple autocommand to run black that's installed in your machine on buffer write event in your neo/vimscript.

`autocmd BufWritePost *.py !black %`