From 0f42b0eebb9ee9c3184108ec7d88c15a2bf69c4d Mon Sep 17 00:00:00 2001 From: Wael Nasreddine Date: Tue, 26 Nov 2024 00:47:49 -0800 Subject: [PATCH] treewide: format all files (#57) Run `nix fmt` at the root of the repository to format all files. I've done this on my fork and this will help me merge your changes later without having to deal with un-formatted files. --- config/auto_cmds.nix | 16 +- config/file_types.nix | 23 ++- config/keymaps.nix | 168 ++++++++++++++++----- config/plugins/cmp/autopairs.nix | 5 +- config/plugins/cmp/cmp-copilot.nix | 8 +- config/plugins/cmp/cmp.nix | 56 +++++-- config/plugins/editor/indent-blankline.nix | 4 +- config/plugins/editor/neo-tree.nix | 13 +- config/plugins/editor/todo-comments.nix | 27 +++- config/plugins/editor/treesitter.nix | 3 +- config/plugins/git/lazygit.nix | 3 +- config/plugins/lsp/conform.nix | 15 +- config/plugins/lsp/fidget.nix | 4 +- config/plugins/lsp/lsp.nix | 55 +++++-- config/plugins/themes/default.nix | 18 +-- config/plugins/ui/lualine.nix | 7 +- config/plugins/ui/startup.nix | 5 +- config/plugins/utils/extra_plugins.nix | 9 +- config/plugins/utils/mini.nix | 2 +- config/plugins/utils/obsidian.nix | 2 +- flake.nix | 90 ++++++----- 21 files changed, 369 insertions(+), 164 deletions(-) diff --git a/config/auto_cmds.nix b/config/auto_cmds.nix index d3017a1..dab6cd3 100644 --- a/config/auto_cmds.nix +++ b/config/auto_cmds.nix @@ -1,15 +1,15 @@ { autoGroups = { - highlight_yank = {}; - vim_enter = {}; - indentscope = {}; - restore_cursor = {}; + highlight_yank = { }; + vim_enter = { }; + indentscope = { }; + restore_cursor = { }; }; autoCmd = [ { group = "highlight_yank"; - event = ["TextYankPost"]; + event = [ "TextYankPost" ]; pattern = "*"; callback = { __raw = '' @@ -21,7 +21,7 @@ } { group = "vim_enter"; - event = ["VimEnter"]; + event = [ "VimEnter" ]; pattern = "*"; callback = { __raw = '' @@ -33,7 +33,7 @@ } { group = "indentscope"; - event = ["FileType"]; + event = [ "FileType" ]; pattern = [ "help" "Startup" @@ -54,7 +54,7 @@ ## from NVChad https://nvchad.com/docs/recipes (this autocmd will restore the cursor position when opening a file) { group = "restore_cursor"; - event = ["BufReadPost"]; + event = [ "BufReadPost" ]; pattern = "*"; callback = { __raw = '' diff --git a/config/file_types.nix b/config/file_types.nix index 1a017c0..0cd31c5 100644 --- a/config/file_types.nix +++ b/config/file_types.nix @@ -1,13 +1,20 @@ { autoGroups = { - filetypes = {}; + filetypes = { }; }; files."ftdetect/terraformft.lua".autoCmd = [ { group = "filetypes"; - event = ["BufRead" "BufNewFile"]; - pattern = ["*.tf" " *.tfvars" " *.hcl"]; + event = [ + "BufRead" + "BufNewFile" + ]; + pattern = [ + "*.tf" + " *.tfvars" + " *.hcl" + ]; command = "set ft=terraform"; } ]; @@ -15,8 +22,14 @@ files."ftdetect/bicepft.lua".autoCmd = [ { group = "filetypes"; - event = ["BufRead" "BufNewFile"]; - pattern = ["*.bicep" "*.bicepparam"]; + event = [ + "BufRead" + "BufNewFile" + ]; + pattern = [ + "*.bicep" + "*.bicepparam" + ]; command = "set ft=bicep"; } ]; diff --git a/config/keymaps.nix b/config/keymaps.nix index 5669deb..3a24edf 100644 --- a/config/keymaps.nix +++ b/config/keymaps.nix @@ -3,7 +3,10 @@ keymaps = [ { - mode = ["n" "x"]; + mode = [ + "n" + "x" + ]; key = "j"; action = "v:count == 0 ? 'gj' : 'j'"; options = { @@ -12,7 +15,10 @@ }; } { - mode = ["n" "x"]; + mode = [ + "n" + "x" + ]; key = ""; action = "v:count == 0 ? 'gj' : 'j'"; options = { @@ -21,7 +27,10 @@ }; } { - mode = ["n" "x"]; + mode = [ + "n" + "x" + ]; key = "k"; action = "v:count == 0 ? 'gk' : 'k'"; options = { @@ -30,7 +39,10 @@ }; } { - mode = ["n" "x"]; + mode = [ + "n" + "x" + ]; key = ""; action = "v:count == 0 ? 'gk' : 'k'"; options = { @@ -78,61 +90,81 @@ mode = "n"; key = ""; action = "resize +2"; - options = {desc = "Increase Window Height";}; + options = { + desc = "Increase Window Height"; + }; } { mode = "n"; key = ""; action = "resize -2"; - options = {desc = "Decrease Window Height";}; + options = { + desc = "Decrease Window Height"; + }; } { mode = "n"; key = ""; action = "vertical resize -2"; - options = {desc = "Decrease Window Width";}; + options = { + desc = "Decrease Window Width"; + }; } { mode = "n"; key = ""; action = "vertical resize +2"; - options = {desc = "Increase Window Width";}; + options = { + desc = "Increase Window Width"; + }; } { mode = "n"; key = ""; action = "m .+1=="; - options = {desc = "Move Down";}; + options = { + desc = "Move Down"; + }; } { mode = "n"; key = ""; action = "m .-2=="; - options = {desc = "Move Up";}; + options = { + desc = "Move Up"; + }; } { mode = "i"; key = ""; action = "m .+1==gi"; - options = {desc = "Move Down";}; + options = { + desc = "Move Down"; + }; } { mode = "i"; key = ""; action = "m .-2==gi"; - options = {desc = "Move Up";}; + options = { + desc = "Move Up"; + }; } { mode = "v"; key = ""; action = ":m '>+1gv=gv"; - options = {desc = "Move Down";}; + options = { + desc = "Move Down"; + }; } { mode = "v"; key = ""; action = ":m '<-2gv=gv"; - options = {desc = "Move Up";}; + options = { + desc = "Move Up"; + }; } { mode = "i"; @@ -150,22 +182,36 @@ action = ";u"; } { - mode = ["i" "x" "n" "s"]; + mode = [ + "i" + "x" + "n" + "s" + ]; key = ""; action = "w"; - options = {desc = "Save File";}; + options = { + desc = "Save File"; + }; } { - mode = ["i" "n"]; + mode = [ + "i" + "n" + ]; key = ""; action = "noh"; - options = {desc = "Escape and Clear hlsearch";}; + options = { + desc = "Escape and Clear hlsearch"; + }; } { mode = "n"; key = "ur"; action = "nohlsearchdiffupdatenormal! "; - options = {desc = "Redraw / Clear hlsearch / Diff Update";}; + options = { + desc = "Redraw / Clear hlsearch / Diff Update"; + }; } { mode = "n"; @@ -225,91 +271,121 @@ mode = "n"; key = "cd"; action = "vim.diagnostic.open_float"; - options = {desc = "Line Diagnostics";}; + options = { + desc = "Line Diagnostics"; + }; } { mode = "n"; key = "]d"; action = "diagnostic_goto(true)"; - options = {desc = "Next Diagnostic";}; + options = { + desc = "Next Diagnostic"; + }; } { mode = "n"; key = "[d"; action = "diagnostic_goto(false)"; - options = {desc = "Prev Diagnostic";}; + options = { + desc = "Prev Diagnostic"; + }; } { mode = "n"; key = "]e"; action = "diagnostic_goto(true 'ERROR')"; - options = {desc = "Next Error";}; + options = { + desc = "Next Error"; + }; } { mode = "n"; key = "[e"; action = "diagnostic_goto(false 'ERROR')"; - options = {desc = "Prev Error";}; + options = { + desc = "Prev Error"; + }; } { mode = "n"; key = "]w"; action = "diagnostic_goto(true 'WARN')"; - options = {desc = "Next Warning";}; + options = { + desc = "Next Warning"; + }; } { mode = "n"; key = "[w"; action = "diagnostic_goto(false 'WARN')"; - options = {desc = "Prev Warning";}; + options = { + desc = "Prev Warning"; + }; } { mode = "n"; key = "qq"; action = "qa"; - options = {desc = "Quit All";}; + options = { + desc = "Quit All"; + }; } { mode = "n"; key = "ui"; action = "vim.show_pos"; - options = {desc = "Inspect Pos";}; + options = { + desc = "Inspect Pos"; + }; } { mode = "t"; key = ""; action = ""; - options = {desc = "Enter Normal Mode";}; + options = { + desc = "Enter Normal Mode"; + }; } { mode = "t"; key = ""; action = "wincmd h"; - options = {desc = "Go to Left Window";}; + options = { + desc = "Go to Left Window"; + }; } { mode = "t"; key = ""; action = "wincmd j"; - options = {desc = "Go to Lower Window";}; + options = { + desc = "Go to Lower Window"; + }; } { mode = "t"; key = ""; action = "wincmd k"; - options = {desc = "Go to Upper Window";}; + options = { + desc = "Go to Upper Window"; + }; } { mode = "t"; key = ""; action = "wincmd l"; - options = {desc = "Go to Right Window";}; + options = { + desc = "Go to Right Window"; + }; } { mode = "t"; key = ""; action = "close"; - options = {desc = "Hide Terminal";}; + options = { + desc = "Hide Terminal"; + }; } { mode = "n"; @@ -369,37 +445,49 @@ mode = "n"; key = "l"; action = "tablast"; - options = {desc = "Last Tab";}; + options = { + desc = "Last Tab"; + }; } { mode = "n"; key = "f"; action = "tabfirst"; - options = {desc = "First Tab";}; + options = { + desc = "First Tab"; + }; } { mode = "n"; key = ""; action = "tabnew"; - options = {desc = "New Tab";}; + options = { + desc = "New Tab"; + }; } { mode = "n"; key = "]"; action = "tabnext"; - options = {desc = "Next Tab";}; + options = { + desc = "Next Tab"; + }; } { mode = "n"; key = "d"; action = "tabclose"; - options = {desc = "Close Tab";}; + options = { + desc = "Close Tab"; + }; } { mode = "n"; key = "["; action = "tabprevious"; - options = {desc = "Previous Tab";}; + options = { + desc = "Previous Tab"; + }; } ]; } diff --git a/config/plugins/cmp/autopairs.nix b/config/plugins/cmp/autopairs.nix index ee5f518..2f3853e 100644 --- a/config/plugins/cmp/autopairs.nix +++ b/config/plugins/cmp/autopairs.nix @@ -2,7 +2,10 @@ plugins.nvim-autopairs = { enable = true; settings = { - disable_filetype = ["TelescopePrompt" "vim"]; + disable_filetype = [ + "TelescopePrompt" + "vim" + ]; }; }; } diff --git a/config/plugins/cmp/cmp-copilot.nix b/config/plugins/cmp/cmp-copilot.nix index f595b09..40db887 100644 --- a/config/plugins/cmp/cmp-copilot.nix +++ b/config/plugins/cmp/cmp-copilot.nix @@ -4,8 +4,12 @@ }; plugins.copilot-lua = { enable = true; - suggestion = {enabled = false;}; - panel = {enabled = false;}; + suggestion = { + enabled = false; + }; + panel = { + enabled = false; + }; }; extraConfigLua = '' diff --git a/config/plugins/cmp/cmp.nix b/config/plugins/cmp/cmp.nix index 2609303..0797f1f 100644 --- a/config/plugins/cmp/cmp.nix +++ b/config/plugins/cmp/cmp.nix @@ -1,28 +1,40 @@ { plugins = { - cmp-emoji = {enable = true;}; + cmp-emoji = { + enable = true; + }; cmp = { enable = true; settings = { autoEnableSources = true; - experimental = {ghost_text = false;}; + experimental = { + ghost_text = false; + }; performance = { debounce = 60; fetchingTimeout = 200; maxViewEntries = 30; }; - snippet = {expand = "luasnip";}; - formatting = {fields = ["kind" "abbr" "menu"];}; + snippet = { + expand = "luasnip"; + }; + formatting = { + fields = [ + "kind" + "abbr" + "menu" + ]; + }; sources = [ - {name = "git";} - {name = "nvim_lsp";} - {name = "emoji";} + { name = "git"; } + { name = "nvim_lsp"; } + { name = "emoji"; } { name = "buffer"; # text within current buffer option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; keywordLength = 3; } - {name = "copilot";} + { name = "copilot"; } { name = "path"; # file system paths keywordLength = 3; @@ -34,8 +46,12 @@ ]; window = { - completion = {border = "solid";}; - documentation = {border = "solid";}; + completion = { + border = "solid"; + }; + documentation = { + border = "solid"; + }; }; mapping = { @@ -51,11 +67,21 @@ }; }; }; - cmp-nvim-lsp = {enable = true;}; # lsp - cmp-buffer = {enable = true;}; - cmp-path = {enable = true;}; # file system paths - cmp_luasnip = {enable = true;}; # snippets - cmp-cmdline = {enable = false;}; # autocomplete for cmdline + cmp-nvim-lsp = { + enable = true; + }; # lsp + cmp-buffer = { + enable = true; + }; + cmp-path = { + enable = true; + }; # file system paths + cmp_luasnip = { + enable = true; + }; # snippets + cmp-cmdline = { + enable = false; + }; # autocomplete for cmdline }; extraConfigLua = '' luasnip = require("luasnip") diff --git a/config/plugins/editor/indent-blankline.nix b/config/plugins/editor/indent-blankline.nix index 0665303..1282a9a 100644 --- a/config/plugins/editor/indent-blankline.nix +++ b/config/plugins/editor/indent-blankline.nix @@ -1,7 +1,7 @@ { plugins = { indent-blankline = { - enable = true; - }; + enable = true; + }; }; } diff --git a/config/plugins/editor/neo-tree.nix b/config/plugins/editor/neo-tree.nix index cbc89bd..f8552c0 100644 --- a/config/plugins/editor/neo-tree.nix +++ b/config/plugins/editor/neo-tree.nix @@ -1,7 +1,12 @@ { plugins.neo-tree = { enable = true; - sources = ["filesystem" "buffers" "git_status" "document_symbols"]; + sources = [ + "filesystem" + "buffers" + "git_status" + "document_symbols" + ]; addBlankLineAtTop = false; filesystem = { @@ -37,10 +42,12 @@ keymaps = [ { - mode = ["n"]; + mode = [ "n" ]; key = "e"; action = "Neotree toggle"; - options = {desc = "Open/Close Neotree";}; + options = { + desc = "Open/Close Neotree"; + }; } ]; } diff --git a/config/plugins/editor/todo-comments.nix b/config/plugins/editor/todo-comments.nix index ae64b80..1e2cdf3 100644 --- a/config/plugins/editor/todo-comments.nix +++ b/config/plugins/editor/todo-comments.nix @@ -3,11 +3,28 @@ _: { enable = true; settings = { colors = { - error = ["DiagnosticError" "ErrorMsg" "#ED8796"]; - warning = ["DiagnosticWarn" "WarningMsg" "#EED49F"]; - info = ["DiagnosticInfo" "#EED49F"]; - default = ["Identifier" "#F5A97F"]; - test = ["Identifier" "#8AADF4"]; + error = [ + "DiagnosticError" + "ErrorMsg" + "#ED8796" + ]; + warning = [ + "DiagnosticWarn" + "WarningMsg" + "#EED49F" + ]; + info = [ + "DiagnosticInfo" + "#EED49F" + ]; + default = [ + "Identifier" + "#F5A97F" + ]; + test = [ + "Identifier" + "#8AADF4" + ]; }; }; }; diff --git a/config/plugins/editor/treesitter.nix b/config/plugins/editor/treesitter.nix index fc6f2d3..4b6648e 100644 --- a/config/plugins/editor/treesitter.nix +++ b/config/plugins/editor/treesitter.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ plugins.treesitter = { enable = true; settings = { diff --git a/config/plugins/git/lazygit.nix b/config/plugins/git/lazygit.nix index 4ad017a..b995898 100644 --- a/config/plugins/git/lazygit.nix +++ b/config/plugins/git/lazygit.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ extraPlugins = with pkgs.vimPlugins; [ lazygit-nvim ]; diff --git a/config/plugins/lsp/conform.nix b/config/plugins/lsp/conform.nix index 88f998d..305c121 100644 --- a/config/plugins/lsp/conform.nix +++ b/config/plugins/lsp/conform.nix @@ -2,7 +2,8 @@ lib, pkgs, ... -}: { +}: +{ config = { extraConfigLuaPre = # lua @@ -105,8 +106,8 @@ "black" "isort" ]; - lua = ["stylua"]; - nix = ["nixfmt-rfc-style"]; + lua = [ "stylua" ]; + nix = [ "nixfmt-rfc-style" ]; markdown = [ [ "prettierd" @@ -119,15 +120,15 @@ "prettier" ] ]; - terraform = ["terraform_fmt"]; - bicep = ["bicep"]; + terraform = [ "terraform_fmt" ]; + bicep = [ "bicep" ]; bash = [ "shellcheck" "shellharden" "shfmt" ]; - json = ["jq"]; - "_" = ["trim_whitespace"]; + json = [ "jq" ]; + "_" = [ "trim_whitespace" ]; }; formatters = { diff --git a/config/plugins/lsp/fidget.nix b/config/plugins/lsp/fidget.nix index 868f386..3968923 100644 --- a/config/plugins/lsp/fidget.nix +++ b/config/plugins/lsp/fidget.nix @@ -3,7 +3,7 @@ enable = true; logger = { level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace” - floatPrecision = 0.01; # Limit the number of decimals displayed for floats + floatPrecision = 1.0e-2; # Limit the number of decimals displayed for floats }; progress = { pollRate = 0; # How and when to poll for progress messages @@ -23,7 +23,7 @@ '' function(msg) return msg.lsp_client.name end ''; - ignore = []; # List of LSP servers to ignore + ignore = [ ]; # List of LSP servers to ignore lsp = { progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size }; diff --git a/config/plugins/lsp/lsp.nix b/config/plugins/lsp/lsp.nix index 4c249f8..b0bdcc0 100644 --- a/config/plugins/lsp/lsp.nix +++ b/config/plugins/lsp/lsp.nix @@ -1,22 +1,49 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ plugins = { - lsp-lines = {enable = true;}; - lsp-format = {enable = true;}; - helm = {enable = true;}; + lsp-lines = { + enable = true; + }; + lsp-format = { + enable = true; + }; + helm = { + enable = true; + }; lsp = { enable = true; inlayHints = true; servers = { - html = {enable = true;}; - lua_ls = {enable = true;}; - nil_ls = {enable = true;}; - ts_ls = {enable = true;}; - marksman = {enable = true;}; - pyright = {enable = true;}; - gopls = {enable = true;}; - terraformls = {enable = true;}; - ansiblels = {enable = true;}; - jsonls = {enable = true;}; + html = { + enable = true; + }; + lua_ls = { + enable = true; + }; + nil_ls = { + enable = true; + }; + ts_ls = { + enable = true; + }; + marksman = { + enable = true; + }; + pyright = { + enable = true; + }; + gopls = { + enable = true; + }; + terraformls = { + enable = true; + }; + ansiblels = { + enable = true; + }; + jsonls = { + enable = true; + }; helm_ls = { enable = true; extraOptions = { diff --git a/config/plugins/themes/default.nix b/config/plugins/themes/default.nix index 8bb5b8d..261786c 100644 --- a/config/plugins/themes/default.nix +++ b/config/plugins/themes/default.nix @@ -47,17 +47,17 @@ background = true; }; virtual_text = { - errors = ["italic"]; - hints = ["italic"]; - information = ["italic"]; - warnings = ["italic"]; - ok = ["italic"]; + errors = [ "italic" ]; + hints = [ "italic" ]; + information = [ "italic" ]; + warnings = [ "italic" ]; + ok = [ "italic" ]; }; underlines = { - errors = ["underline"]; - hints = ["underline"]; - information = ["underline"]; - warnings = ["underline"]; + errors = [ "underline" ]; + hints = [ "underline" ]; + information = [ "underline" ]; + warnings = [ "underline" ]; }; }; }; diff --git a/config/plugins/ui/lualine.nix b/config/plugins/ui/lualine.nix index b59b520..2fa3147 100644 --- a/config/plugins/ui/lualine.nix +++ b/config/plugins/ui/lualine.nix @@ -9,7 +9,10 @@ _: { "neo-tree" ]; disabledFiletypes = { - statusline = ["startup" "alpha"]; + statusline = [ + "startup" + "alpha" + ]; }; theme = "catppuccin"; }; @@ -37,7 +40,7 @@ _: { lualine_c = [ { __unkeyed-1 = "diagnostics"; - sources = ["nvim_lsp"]; + sources = [ "nvim_lsp" ]; symbols = { error = " "; warn = " "; diff --git a/config/plugins/ui/startup.nix b/config/plugins/ui/startup.nix index 7c64e4a..a665f22 100644 --- a/config/plugins/ui/startup.nix +++ b/config/plugins/ui/startup.nix @@ -74,7 +74,10 @@ }; options = { - paddings = [1 3]; + paddings = [ + 1 + 3 + ]; }; parts = [ diff --git a/config/plugins/utils/extra_plugins.nix b/config/plugins/utils/extra_plugins.nix index 98d8867..28fa3ff 100644 --- a/config/plugins/utils/extra_plugins.nix +++ b/config/plugins/utils/extra_plugins.nix @@ -1,4 +1,7 @@ -{pkgs, ...}: { - extraPlugins = with pkgs.vimPlugins; [ - ]; +{ pkgs, ... }: +{ + extraPlugins = + with pkgs.vimPlugins; + [ + ]; } diff --git a/config/plugins/utils/mini.nix b/config/plugins/utils/mini.nix index 8f1097c..fa2eedb 100644 --- a/config/plugins/utils/mini.nix +++ b/config/plugins/utils/mini.nix @@ -9,7 +9,7 @@ try_as_border = true; }; }; - surround = {}; + surround = { }; }; }; } diff --git a/config/plugins/utils/obsidian.nix b/config/plugins/utils/obsidian.nix index 2db81da..d100fb1 100644 --- a/config/plugins/utils/obsidian.nix +++ b/config/plugins/utils/obsidian.nix @@ -12,7 +12,7 @@ subdir = "templates"; dateFormat = "%Y-%m-%d"; timeFormat = "%H:%M"; - substitutions = {}; + substitutions = { }; }; dailyNotes = { diff --git a/flake.nix b/flake.nix index 100b6e6..bc8492c 100644 --- a/flake.nix +++ b/flake.nix @@ -12,51 +12,59 @@ }; }; - 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"]; + 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 - nixvim' = nixvim.legacyPackages.${system}; - nvim = nixvim'.makeNixvimWithModule { - inherit pkgs; - module = ./config; - }; - in { - checks = { - default = pkgs.nixvimLib.check.mkTestDerivationFromNvim { - inherit nvim; - name = "A nixvim configuration"; + perSystem = + { + system, + pkgs, + self', + lib, + ... + }: + let + nixvim' = nixvim.legacyPackages.${system}; + nvim = nixvim'.makeNixvimWithModule { + inherit pkgs; + module = ./config; }; - pre-commit-check = pre-commit-hooks.lib.${system}.run { - src = ./.; - hooks = { - statix.enable = true; - nixfmt-rfc-style.enable = true; + in + { + checks = { + default = pkgs.nixvimLib.check.mkTestDerivationFromNvim { + inherit nvim; + name = "A nixvim configuration"; + }; + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + hooks = { + statix.enable = true; + nixfmt-rfc-style.enable = true; + }; }; }; + + formatter = pkgs.nixfmt-rfc-style; + + packages.default = nvim; + + devShells = { + default = with pkgs; mkShell { inherit (self'.checks.pre-commit-check) shellHook; }; + }; }; - - formatter = pkgs.nixfmt-rfc-style; - - packages.default = nvim; - - devShells = { - default = with pkgs; - mkShell {inherit (self'.checks.pre-commit-check) shellHook;}; - }; - }; }; }