home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

neovim: fix a typo in the generated init.lua

Open Soupstraw opened this issue 2 years ago • 5 comments

Description

Fixes a syntax error that prevents neovim from loading the vimscript configuration file. closes #3250

Checklist

  • [x] Change is backwards compatible.

  • [x] Code formatted with ./format.

  • [x] Code tested through nix-shell --pure tests -A run.all.

  • [ ] Test cases updated/added. See example.

  • [x] Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • [ ] Added myself as module maintainer. See example.

    • [ ] Added myself and the module files to .github/CODEOWNERS.

Soupstraw avatar Sep 22 '22 13:09 Soupstraw

@Soupstraw I hope I'm not spamming by asking this again but it was left unclear to me, whether this PR should also rename init.vim to something else to avoid the conflicting configs error?

E5422: Conflicting configs: "/home/kk/.config/nvim/init.lua" "/home/kk/.config/nvim/init.vim"

(I asked this on the first PR as well, but I'm not sure if it was left unnoticed.)

kiviktnm avatar Sep 22 '22 13:09 kiviktnm

I don't mind renaming, but I'm having a hard time trying to come up with a name. nix.vim sounds like it's configuring nix not neovim.

Soupstraw avatar Sep 22 '22 13:09 Soupstraw

Or we can get this merged and then open an issue for the renaming. The bug makes neovim unusable for the time being, so the sooner we get this merged the better.

I tested it with my older config and it worked without having to make any changes to the config.

Soupstraw avatar Sep 22 '22 13:09 Soupstraw

Yeah, that's true. I am quite inexperienced and I don't know what the best practices are so you're probably right. I just thought it might be easier to fix now as well by renaming it to something like config.vim or nvim.vim.

kiviktnm avatar Sep 22 '22 13:09 kiviktnm

could you rename init.vim to init-home-manager.vim (that's how the lua initrc used to be called) ? it's mandatory to have a different name there my bad. Would be nice to test the whole behaviour. For instance modify this test https://github.com/nix-community/home-manager/blob/master/tests/modules/programs/neovim/plugin-config.nix to check for the presence of the different init files and their content.

teto avatar Sep 22 '22 17:09 teto

fix the format and I merge ty !

teto avatar Sep 23 '22 10:09 teto