nixvim icon indicating copy to clipboard operation
nixvim copied to clipboard

wrappers/hm: add vimdiffAlias option

Open GaetanLepage opened this issue 4 months ago • 6 comments

Implement the programs.neovim.vimdiffAlias option from HM in nixvim. Note: this only applies to the HM module.

Fixes #1351

GaetanLepage avatar Mar 30 '24 12:03 GaetanLepage

This needs to be documented somewhere, because as is I don't think the option will appear in the documentation.

traxys avatar Mar 30 '24 12:03 traxys

I though about this a bit more, I think we should add this feature in the same place as the viAlias/vimAlias and do the work for all the wrappers (nix-darwin, home-manager, nixos, standalone) or we should not do it at all

traxys avatar Mar 30 '24 13:03 traxys

I think we should add this feature in the same place as the viAlias/vimAlias and do the work for all the wrappers (nix-darwin, home-manager, nixos, standalone)

Could we use pkgs.wrapProgram, pkgs.makeWrapper, or similar on platforms where we can't make shell aliases?

MattSturgeon avatar Mar 31 '24 06:03 MattSturgeon

Yeah I think we would need to do this for the standalone wrapper. It may be the best to do it for everyone though (mabye even do this in nixpkgs proper? The viAlias & vimAlias is implemented there IIRC)

traxys avatar Mar 31 '24 14:03 traxys

This needs to be documented somewhere, because as is I don't think the option will appear in the documentation.

This was resolved in #1355.

I think we should add this feature in the same place as the viAlias/vimAlias and do the work for all the wrappers (nix-darwin, home-manager, nixos, standalone)

Could we use pkgs.wrapProgram, pkgs.makeWrapper, or similar on platforms where we can't make shell aliases?

We already have defaultEditor exclusive to home-manager. Perhaps porting these could be handled in a separate PR?

I don't think not having this everywhere should necessarily be a blocker.

MattSturgeon avatar Apr 09 '24 15:04 MattSturgeon

maybe even do this in nixpkgs proper? The viAlias & vimAlias is implemented there IIRC

That's correct. I'm happy for this to be merged as a stop-gap, but I agree long-term it'd be better to have this everywhere or even in nixpkgs' nvim wrapper.

IMO a lot of our wrapper stuff could be unified, so maybe there's some future (unrelated) refactoring to be done there...

MattSturgeon avatar May 03 '24 15:05 MattSturgeon