neovim: simplify implementation

This commit is contained in:
2023-11-25 04:46:24 +00:00
parent 43f7f07d0e
commit 10aea555dd

View File

@@ -85,21 +85,10 @@ let
plugin-config-lua = concatMapStrings (p: optionalString (p.type or "" == "lua") p.config) plugins;
in
{
# private because there could be sensitive things in the swap
sane.programs.neovim = {
persist.byStore.private = [ ".cache/vim-swap" ];
env.EDITOR = "vim";
# git claims it should use EDITOR, but it doesn't!
env.GIT_EDITOR = "vim";
mime.priority = 200; # default=100 => yield to other, more specialized applications
mime.associations."application/schema+json" = "nvim.desktop";
mime.associations."plain/text" = "nvim.desktop";
mime.associations."text/markdown" = "nvim.desktop";
};
programs.neovim = mkIf config.sane.programs.neovim.enabled {
# neovim: https://github.com/neovim/neovim
enable = true;
# package = config.programs.neovim.finalPackage;
package = pkgs.wrapNeovim pkgs.neovim-unwrapped {
withRuby = false; #< doesn't cross-compile w/o binfmt
viAlias = true;
vimAlias = true;
configure = {
@@ -149,4 +138,15 @@ in
'';
};
};
# private because there could be sensitive things in the swap
persist.byStore.private = [ ".cache/vim-swap" ];
env.EDITOR = "vim";
# git claims it should use EDITOR, but it doesn't!
env.GIT_EDITOR = "vim";
mime.priority = 200; # default=100 => yield to other, more specialized applications
mime.associations."application/schema+json" = "nvim.desktop";
mime.associations."plain/text" = "nvim.desktop";
mime.associations."text/markdown" = "nvim.desktop";
};
}