flake.nix 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {
  2. description = "Neovim configuration";
  3. inputs = {
  4. nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  5. flake-utils.url = "github:numtide/flake-utils";
  6. blink-cmp = {
  7. url = "github:Saghen/blink.cmp";
  8. inputs.nixpkgs.follows = "nixpkgs";
  9. };
  10. };
  11. outputs = { self, nixpkgs, flake-utils, blink-cmp }:
  12. flake-utils.lib.eachDefaultSystem (system:
  13. let
  14. pkgs = import nixpkgs {
  15. inherit system;
  16. overlays = [(final: prev: {
  17. node-lsp = final.callPackage ./node-lsp {};
  18. blink-cmp = blink-cmp.packages.${system}.blink-cmp;
  19. neovim-unwrapped = prev.neovim-unwrapped.overrideAttrs (attrs: attrs // {
  20. patches = (attrs.patches or []) ++ [
  21. # fix occasional treesitter highlighter error when deleting lines
  22. ./neovim-32619.patch
  23. # fix floating windows not closing when going to another file
  24. ./neovim-34946.patch
  25. ];
  26. });
  27. })];
  28. };
  29. in
  30. {
  31. packages.neovim = pkgs.callPackage ./neovim.nix {};
  32. packages.neovim-minimal = (pkgs.callPackage ./neovim.nix {}).minimal;
  33. packages.default = self.packages.${system}.neovim;
  34. devShells.default = pkgs.mkShell {
  35. packages = with pkgs; [
  36. lua-language-server
  37. ];
  38. };
  39. }
  40. );
  41. }