Something went wrong. Try again.
My NixVim configuration
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485{ description = "deCort.tech NeoVim configuration";
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; nixvim = { url = "github:nix-community/nixvim"; }; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; }; md-render = { url = "github:delphinus/md-render.nvim/v3.4.0"; flake = false; }; mmdr = { url = "github:1jehuang/mermaid-rs-renderer/v0.3.1"; inputs.nixpkgs.follows = "nixpkgs"; }; };
outputs = { nixpkgs, nixvim, flake-parts, pre-commit-hooks, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { system, pkgs, self', lib, ... }: let nixvimLib = nixvim.lib.${system}; nixvim' = nixvim.legacyPackages.${system}; nixvimModule = { inherit pkgs; module = import ./config; # import the module directly # You can use `extraSpecialArgs` to pass additional arguments to your module files extraSpecialArgs = { mdRender = inputs.md-render; mmdr = inputs.mmdr.packages.${system}.default; }; }; nvim = nixvim'.makeNixvimWithModule nixvimModule; in { checks = { default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule; pre-commit-check = pre-commit-hooks.lib.${system}.run { src = ./.; hooks = { statix.enable = true; nixfmt.enable = true; }; }; };
formatter = pkgs.nixfmt-tree;
packages = { default = nvim; };
devShells = { default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; }; }; }; };}