Skip to content

Commit

Permalink
nixos: Create wrapper for nvim in nixos
Browse files Browse the repository at this point in the history
  • Loading branch information
juanibiapina committed Mar 17, 2024
1 parent d008462 commit f2dc0ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/nix/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
vivaldi

# coding
neovim-unwrapped
(callPackage ./packages/nvim.nix {})
vim
vscode

Expand Down
16 changes: 16 additions & 0 deletions assets/nix/packages/nvim.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ writeShellApplication, wrapNeovim, neovim-unwrapped }:

let
wrapped = wrapNeovim neovim-unwrapped {
configure = {
customRC = /* vim */ ''
" Load configuration from default location
source $HOME/.config/nvim/init.lua
'';
};
};
in
writeShellApplication {
name = "nvim";
text = ''${wrapped}/bin/nvim "$@"'';
}

0 comments on commit f2dc0ba

Please sign in to comment.