this repo has no description
at main 97 lines 3.2 kB view raw view rendered
1## Gift Wrap 2 3Gift wrap is a simple neovim wrapper for nix that allows you to maintain your 4neovim configuration with lua and with nix for package management. As gift wrap 5is ment to be a very minimal neovim wrapper, it abstracts very little, and is 6based off of the nixpkgs wrapper but with some personalized tweaks. 7 8### Usage 9 10```nix 11{ 12 inputs = { 13 nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz"; 14 15 gift-wrap = { 16 url = "github:tgirlcloud/gift-wrap"; 17 inputs.nixpkgs.follows = "nixpkgs"; 18 }; 19 }; 20 21 outputs = { self, nixpkgs, gift-wrap }: 22 let 23 inherit (nixpkgs) lib; 24 25 forAllSystems = 26 f: lib.genAttrs lib.systems.flakeExposed (system: f nixpkgs.legacyPackages.${system}); 27 in 28 { 29 packages = forAllSystems (pkgs: { 30 nvim = gift-wrap.legacyPackages.${pkgs.system}.wrapNeovim { 31 # what is the name of your neovim config? 32 pname = "my-neovim"; 33 34 # perhaps add a version suffix to your package 35 # this is a sensible default 36 versionSuffix = self.shortRev or self.dirtyShortRev or "unknown"; 37 38 # this is the base package for your neovim configuration 39 # this defaults to neovim-unwrapped and most of the time you will not need to change this 40 basePackage = pkgs.neovim-unwrapped; 41 42 # this field allows you to create aliases to the neovim executable 43 # this defaults to blank, the bellow example will create the aliases `vi` and `vim` 44 aliases = [ "vi" "vim" ]; 45 46 # wether to keep the desktop files for neovim 47 # by default this is set to false, but you can set it to true 48 keepDesktopFiles = true; 49 50 # your user conifguration, this should be a path your nvim config in lua 51 userConfig = ./config; 52 53 # all the plugins that should be stored in the neovim start directory 54 # these are the plugins that are loaded when neovim starts 55 startPlugins = with pkgs.vimPlugins; [ 56 nvim-treesitter.withAllGrammars 57 nvim-lspconfig 58 ]; 59 60 # these are plugins that are loaded on demand by your configuration 61 optPlugins = with pkgs.vimPlugins; [ 62 blink-cmp 63 telescope 64 lazygit-nvim 65 ]; 66 67 # these are any extra packages that should be available in your neovim environment 68 extraPackages = with pkgs; [ 69 ripgrep 70 fd 71 inotify-tools 72 lazygit 73 ]; 74 75 # below is a list of plugin providers, these should then be 76 # configured in your plugin or setup properly by adding to your path 77 # or the extraInitLua 78 # 79 # this can also be a list of strings 80 providers = { 81 node = false; 82 python = false; 83 python3 = true; 84 ruby = false; 85 perl = false; 86 }; 87 88 # following the providers above, you can set the exact package for 89 # your providers, in this case python3 90 extraInitLua = '' 91 vim.g.python3_host_prog = '${lib.getExe pkgs.python3}' 92 ''; 93 }; 94 }); 95 }; 96} 97```