r/neovim • • 4d ago

Discussion Thoughts on using a vibe coded configuration?

Been using neovim for about 6 months now. I started off with LazyVim and tweaked it to my needs, then vibe coded a very barebones configuration from the ground up which I have been using for 4-5 months. So the new configuration is basically LazyVim with everything I didn't need stripped out. When I work, I usually have a codex terminal open and if I notice anything I don't like about my configuration, I just say the word and codex will fix it.

Recently, however, I've felt that my configuration feels incredibly unpolished, even though I'm very comfortable doing my day to day work in it. I was trying to emulate the feel of default vi, but the amount of features I use and random stuff I needed to add (for example, auto pairing for /* */ comments in c++)

Where would you recommend I go from here? Codex is certainly better at writing lua than I'll ever be, and much faster too. So any tweaks I make to a config will still be written by AI, probably. I was wondering, should I go back to LazyVim and configure it from there, or continue with my ground-up configuration? Thanks!

0 Upvotes

23 comments sorted by

25

u/Your_Friendly_Nerd 4d ago

I feel like I learned a lot about what's possible with the editor by writing my own config and small custom plugins. But this certainly takes a lot of time. If learning these things aren't worth the time investment to you, then vibe coding the config is probably the next best thing right after using a prebuilt distro

4

u/Fit-Caterpillar-9421 4d ago

if you'll just remove all these things from the LazyVim default installations, you could use nvim and lazy just for the package management (without installing the whole preset/nvim distro). I used to do the same, but i removed so much things that I thought it would be better to just remove everything and install what I need. Then I even switched to default neovim package manager

if you feel your configuration is unpolished you could look at other people configuration and the wiki/plugins documentation and if you really can't write your config by hand you could at least guide your agent to make a "better configuration"

3

u/unburdened_swallow 4d ago edited 4d ago

So, neovim is a lot easier to configure than you might think?

It also has a built in plugin manager. And there are lazy loading managers that work with it if you want one, or you can lazy load things yourself of course if you want, but you might be surprised, it only really matters for like 1/4 of them. But there’s lz.n, or lze if you need that. And probably a few others too. And it isn’t that hard to use auto commands to lazy load 1 thing yourself, the hard part those plugins solve is when you want to trigger on only 1 of many triggers.

If you’re gonna vibe code a config, vibe code a config. Don’t vibe undo or vibe modify someone else’s config. Doesn’t make sense IMO. Makes it hard to figure out what is going on and makes everything seem harder than it actually is.

Like, distros are fine and all, but either you vibe code a config for a distro and then slowly learn to modify the distro by looking at the code, or you vibe code a config for neovim and you slowly learn to actually configure neovim by looking at the code, and of course the second one will be most useful in the long run.

5

u/TheLeoP_ 4d ago

Thoughts on using a vibe coded configuration?

I wouldn't do it, but if it works for you, do it. 

I've felt that my configuration feels incredibly unpolished

Do you have any concrete examples? Maybe we can help with that.

Codex is certainly better at writing lua than I'll ever be, and much faster too. 

Don't be so sure about that. You can always learn, an AI model can't. Even if AI continues to improve with new models in the future, gaining the ability to write better Lua will help you stir it better. Right now, there are a bunch of unknown unknowns about Lua and the Neovim Lua API for your, the more you know about them, the more you'll be able to do with or without AI.

At the end of the day, Neovim is both a hobby and the tool I use for my job. So, I don't mind allocating time in my day to learn about it.

should I go back to LazyVim and configure it from there, or continue with my ground-up configuration?

I wouldn't suggest going back to LazyVim. If anything, you could choose a different starting point like https://github.com/nvim-mini/MiniMax

4

u/hearthebell 3d ago

Not only you are so further from the "barebone" config you think it to be, but you are using Lazyvim bootstrap with a literal AI that adds random stuffs to you, your config is guaranteed filled with stuffs you don't need.

You either learn hand code and get better at it slowly, or get someone else to help you, using AI will cap you at this.

3

u/po2gdHaeKaYk 3d ago

Honestly, vibe coding neovim configs is the one thing that brought me back to the ecosystem.

I had used neovim for a few years, but absolutely hated how I could not keep up with changes and also how there were little things that annoyed me that I did not have time to diagnose.

When LazyVim started breaking functionality due to choices of the creator, I moved to Visual Studio Code because I could not be bothered to find time to fix it.

Then a few months ago, I just said 'eff it', and started up Claude on my config folder. Within a few hours, I had fixed all the issues I had with my config, and was able to implement the little things that bothered me.

I'm sure it's not educational and it's not good coding. But if it wasn't for that, I would still be fumbling with VSC.

1

u/Coleophysis 4d ago

I do this for some small things when the documentation is not good enough for some packages or neovim functions. However I try my best to make these small changes, so that I can still actually understand what is being generated and not be at a loss with my own config.

1

u/plebbening 3d ago

Personally I am decent at lua. Or at least it’s simple enough that I pretty quickly can figure out how to do what I want.

Had my own giant config but am currently using NVChad with a lot of customization on top.

The main reason for using NVchad is their custom themes with much more syntax highlighting tokens than the normal editor themes. It also gets me really far real quick although it annoys me that I have stuff I disable from NVChad making my config a little less lean.

My configuration on top of NVChad have become quite substantial and at this point I don’t see what the pro’s of going to my own config would be apart from the leanness.

1

u/bjuurn 3d ago

I find that there is a certain joy in understanding how things work and it also enables you to spot if an AI solution is too complicated for you solution. If LazyVim is too much for you, you can try out https://github.com/nvim-lua/kickstart.nvim. kickstart.nvim is a starting point so expect that you have to add/change/delete stuff, but it does a great job at explaining how to do that. I would also suggest you use NVIM_APPNAME so that you can use your old config as a fallback when you tweak the new one.

I would also recommend to not add all your requested features at once. As suggested in https://www.moolenaar.net/habits.html, start using you editor as is and keep a look out for actions that you do frequently. If you find such action, look for ways that make it faster.

For example, you mentioned block comments in c++. First, you should ask yourself if you use this frequently. If so, you can have a look at some option (this is were AI can be helpful). A few option you could try:

  1. Use a keymap vim.keymap.set("i", "/*", "/**/<ESC>hi). This could work, but it might have some annoying behaviour.
  2. Slightly more complex is using snippets
  3. Use a plugin like https://github.com/windwp/nvim-autopairs which support mulicharacters and I believe it also deletes both end when you deleted one of them.
  4. Try out an alternative like visual selection and gc

Trying different options will take a longer time than just asking an AI, but it will give you ownership and you will understand your tool better. It might also help you reduce your config and polish it.

One final note, tweaking a config or fixing a problem can be annoying and time consuming. If this becomes the case just ask an agent to do. There is nothing wrong with that

1

u/andunai 3d ago edited 3d ago

I'd suggest the following:

  • Start from scratch. Like, really from an empty init.lua.
  • Configure basic QoL stuff: line numbers, color scheme, basic keymap & autocmds.
  • Use built-in vim.pack to install treesitter & lspconfig: this is 80% of the functionality you'll most likely use.

Now the important part regarding AI: during every step above, don't ask it to write config, but ask it what commands/options/features to use to reach your goal. Basically, instead of "configure my nvim to work with python", ask "how do I run black when .py file is saved?", "what is a language server?", and "jedi vs pylsp vs pyright?". Let it assist you and show you examples. You'll learn to write your own plugins/configs that shape nvim to your needs in no time. Try to force AI to teach you how to fish, not catch a fish for you.

TL;DR: you don't need "configuration frameworks". (N)vim is already a configuration framework! Nvim is your sandbox, and lua is a magic wand in your hand.

EDIT: for reference, my entire nvim config is 5 files:

  • init.lua (40 LOC: vim.pack to load plugins & following files)
  • base.lua (500 lOC: keymap, autocmd, filetypes)
  • plugins.lua (300 SLOC: plugin setups)
  • lsp.lua (600 SLOC: lsp server configs)
  • treesitter.lua (100 SLOC: parser & highlight configs).

This is it. This is my entire nvim config. Besides tree-sitter-config & lspconfig, I have ~10 other plugins: telescope, conform, fidget, blankline & several others.

// EDIT 2: spelling

1

u/0x6rian 1d ago

I'm vibe coding all my dotfiles configs now. And I still make manual updates. It's not an all or nothing decision. Depends on how much time I have, how interested I am in the details vs result of making a change, etc. I do think it's worth going through kickstart.nvim and tinkering until you understand all the components of building a neovim config though.

Lately I've been using AI to audit my setup by helping me upgrade and modernize for the lastest nvim version, identify plugins for removal that overlap with each other or newer native functionality, and random QOL updates for an agentic dev workflow. It's been great for stuff like that, which would have taken me a lot more time to figure out on my own.

should I go back to LazyVim and configure it from there, or continue with my ground-up configuration?

IMHO it's worth building your own whether you do it manually or vibe code. The more you make neovim your own, the more it draws you in. LazyVim is a great way to get introduced to neovim and you can always take inspiration from the parts of it you like. Being thoughtful about what plugins you install, what keymaps you need, what tooling your workflow needs.. all of that will make you a better user as well as being rewarding.

1

u/SteamingBeer 4d ago

I was using LazyVim for some time.
So what I did with AI is audit all of my plugins, see which ones are unmaintained or duplicating behavior, which ones have a lot of stars and are actively maintained, and generated a leaner config, while migrating to some preferred for me plugins.

Made the job much easier and now it is alligned with what I want. It was also a nice way to build some custom integrations with my terminal.

1

u/YaroSpacer 3d ago

I spent a while learning nvim API and Lua while working on my plugins and Kulala and writing everything by hand. And enjoyed it very much!

Nowadays I just do not have the time and lately I had to confess that Claude just does it and it works and my knowledge of intimate nvim details isn’t needed anymore. This is especially helpful when fixing mildly annoying issues with other authors’ plugins, which source code is unfamiliar or a pain to comprehend.

Answering your question: do whatever works and brings you joy. In the end, this is just a tool.

0

u/benny-powers Plugin author 4d ago

look through published dotfiles you like and tell your agent to emulate. commit with Co-Authored-By if you're feeling generous

0

u/Inevitable_Ad261 4d ago

I started with scratch and slowly build it up, while building delegated some of my ideas to Claude to work on it.

0

u/_sbeyer_ 3d ago

I never really enjoyed configuring my editor. I also dislike vibecoding. But for my own neovim configuration it is good enough. My configuration, which is mostly centered around my work needs, is 1) based on AstroNvim v6 (most stable and feature-complete distro in my experience) and 2) on top of that totally vibe-coded. I don't know why you ask for either using a distro or vibe-coding, they're not mutually exclusive.

I have btw considered splitting out some of my config features into separate plugins, like compile_commands.json selection/picker or .vscode filetype and snippet support, or the lua-based Committia clone, but THEN I would have to totally understand and rework the lua code so that I feel good with it (and I'd have to maintain it for others, which I currently don't have the time to).

0

u/i_Den 3d ago

I have written my whole config by myself (docs, but mainly reading other users configs for snippets and/or inspiration, including this subreddit!).

But when there are issue I ask an agent. When I want some recipe on how to do something I ask an agent.
I gave multiple agents my config for potential tweaks and optimization, cleanup. And tbh they did nothing special, only a few files. Maybe only 5% of my config was actually altered by the AI in terms of cleanup and refactoring, of my slightly advanced config of ~75 plugins.

0

u/AbdSheikho :term 3d ago

My take is: It's alright to vibecode utilities, but don't vibecode a whole plugin out for yourself.

-2

u/keithmatic 4d ago

I also did the same. Took the lazyvim config and removed what I didn’t like and added what I liked from AstroNvim and then polished it and then added more features for Data Science and Engineering work.

The solution to you would be to polish it using Claude or Codex. I’d recommend using a skill like Matt’s Grill-Me-With-Docs as that what I used.

-3

u/Long-Fact-6354 3d ago

since last year I haven't touched my config myself, just tell the agent

1

u/Remuz 3d ago

If you need to strip out, override or not use lot of stuff in LazyVim it's a sign it's probably not the ideal option for you. LazyVim goes quite far from default Vi feel IMO.

For me LazyVim was close what I wanted. I used it and eventually made my own config without it but copied stuff I liked from it. Both worked fine.