nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

Few remarks/questions about nixvim

Open teto opened this issue 2 years ago • 2 comments

hi,

I contribute regularly to nix+neovim issues and while I dont use nixvim (I prefer a more laid back approach)m I have a few changes in mind I would like to apply to the nixpkgs neovim wrapper. I had a (quick) look at nixvim code to see how it could impact it and I have a few questions/remarks

  • toLuaObject could be replaced by lib.generators.toLua
  • if you really want to go hardcore and generate nix code for options, there is https://github.com/neovim/neovim/blob/master/src/nvim/options.lua
  • I was surprised nix run github:nix-community/nixvim wouldn't showcase some example config ?
  • do you check the generated config ? aka start nvim and see if it launches errors ? I would like to have this (optionnally) in nixpkgs ?
  • does a nixvim generated executable read ~/.config ? I would like to make it easier to generate the hybrid neovim that has a nix base but reads from XDG config and a hardened pure nix config as requested in https://github.com/NixOS/nixpkgs/issues/ (maybe using NVIM_APPNAME)

teto avatar Oct 23 '23 00:10 teto

  • We could use lib.generators.toLua, but I'm not sure it support mixed table & lists (i.e { foo, bar, key = baz}
  • True, we already do that generation for some of our plugins (like rust-analyzer or efmls-configs)
  • We do have an example.nix that we could plug to nix run
  • By check you mean check for errors? We launch a headless neovim instance and we check that stdout is empty, you can check the implementation
  • I don't really remember the exact details on how we generate the configurations, I would need to look into it, as we support standalone flakes, a HM module & a NixOS module

traxys avatar Oct 23 '23 08:10 traxys

  • does a nixvim generated executable read ~/.config ? I would like to make it easier to generate the hybrid neovim that has a nix base but reads from XDG config and a hardened pure nix config as requested in https://github.com/NixOS/nixpkgs/issues/ (maybe using NVIM_APPNAME)

No it's not reading ~/.config as far as I know

ehsan2003 avatar Jan 27 '24 17:01 ehsan2003