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.
This commit is contained in:
Wael Nasreddine 2024-11-26 00:47:49 -08:00 committed by GitHub
parent 70f8b2360f
commit 0f42b0eebb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 369 additions and 164 deletions

View file

@ -1,15 +1,15 @@
{ {
autoGroups = { autoGroups = {
highlight_yank = {}; highlight_yank = { };
vim_enter = {}; vim_enter = { };
indentscope = {}; indentscope = { };
restore_cursor = {}; restore_cursor = { };
}; };
autoCmd = [ autoCmd = [
{ {
group = "highlight_yank"; group = "highlight_yank";
event = ["TextYankPost"]; event = [ "TextYankPost" ];
pattern = "*"; pattern = "*";
callback = { callback = {
__raw = '' __raw = ''
@ -21,7 +21,7 @@
} }
{ {
group = "vim_enter"; group = "vim_enter";
event = ["VimEnter"]; event = [ "VimEnter" ];
pattern = "*"; pattern = "*";
callback = { callback = {
__raw = '' __raw = ''
@ -33,7 +33,7 @@
} }
{ {
group = "indentscope"; group = "indentscope";
event = ["FileType"]; event = [ "FileType" ];
pattern = [ pattern = [
"help" "help"
"Startup" "Startup"
@ -54,7 +54,7 @@
## from NVChad https://nvchad.com/docs/recipes (this autocmd will restore the cursor position when opening a file) ## from NVChad https://nvchad.com/docs/recipes (this autocmd will restore the cursor position when opening a file)
{ {
group = "restore_cursor"; group = "restore_cursor";
event = ["BufReadPost"]; event = [ "BufReadPost" ];
pattern = "*"; pattern = "*";
callback = { callback = {
__raw = '' __raw = ''

View file

@ -1,13 +1,20 @@
{ {
autoGroups = { autoGroups = {
filetypes = {}; filetypes = { };
}; };
files."ftdetect/terraformft.lua".autoCmd = [ files."ftdetect/terraformft.lua".autoCmd = [
{ {
group = "filetypes"; group = "filetypes";
event = ["BufRead" "BufNewFile"]; event = [
pattern = ["*.tf" " *.tfvars" " *.hcl"]; "BufRead"
"BufNewFile"
];
pattern = [
"*.tf"
" *.tfvars"
" *.hcl"
];
command = "set ft=terraform"; command = "set ft=terraform";
} }
]; ];
@ -15,8 +22,14 @@
files."ftdetect/bicepft.lua".autoCmd = [ files."ftdetect/bicepft.lua".autoCmd = [
{ {
group = "filetypes"; group = "filetypes";
event = ["BufRead" "BufNewFile"]; event = [
pattern = ["*.bicep" "*.bicepparam"]; "BufRead"
"BufNewFile"
];
pattern = [
"*.bicep"
"*.bicepparam"
];
command = "set ft=bicep"; command = "set ft=bicep";
} }
]; ];

View file

@ -3,7 +3,10 @@
keymaps = [ keymaps = [
{ {
mode = ["n" "x"]; mode = [
"n"
"x"
];
key = "j"; key = "j";
action = "v:count == 0 ? 'gj' : 'j'"; action = "v:count == 0 ? 'gj' : 'j'";
options = { options = {
@ -12,7 +15,10 @@
}; };
} }
{ {
mode = ["n" "x"]; mode = [
"n"
"x"
];
key = "<Down>"; key = "<Down>";
action = "v:count == 0 ? 'gj' : 'j'"; action = "v:count == 0 ? 'gj' : 'j'";
options = { options = {
@ -21,7 +27,10 @@
}; };
} }
{ {
mode = ["n" "x"]; mode = [
"n"
"x"
];
key = "k"; key = "k";
action = "v:count == 0 ? 'gk' : 'k'"; action = "v:count == 0 ? 'gk' : 'k'";
options = { options = {
@ -30,7 +39,10 @@
}; };
} }
{ {
mode = ["n" "x"]; mode = [
"n"
"x"
];
key = "<Up>"; key = "<Up>";
action = "v:count == 0 ? 'gk' : 'k'"; action = "v:count == 0 ? 'gk' : 'k'";
options = { options = {
@ -78,61 +90,81 @@
mode = "n"; mode = "n";
key = "<C-Up>"; key = "<C-Up>";
action = "<cmd>resize +2<cr>"; action = "<cmd>resize +2<cr>";
options = {desc = "Increase Window Height";}; options = {
desc = "Increase Window Height";
};
} }
{ {
mode = "n"; mode = "n";
key = "<C-Down>"; key = "<C-Down>";
action = "<cmd>resize -2<cr>"; action = "<cmd>resize -2<cr>";
options = {desc = "Decrease Window Height";}; options = {
desc = "Decrease Window Height";
};
} }
{ {
mode = "n"; mode = "n";
key = "<C-Left>"; key = "<C-Left>";
action = "<cmd>vertical resize -2<cr>"; action = "<cmd>vertical resize -2<cr>";
options = {desc = "Decrease Window Width";}; options = {
desc = "Decrease Window Width";
};
} }
{ {
mode = "n"; mode = "n";
key = "<C-Right>"; key = "<C-Right>";
action = "<cmd>vertical resize +2<cr>"; action = "<cmd>vertical resize +2<cr>";
options = {desc = "Increase Window Width";}; options = {
desc = "Increase Window Width";
};
} }
{ {
mode = "n"; mode = "n";
key = "<A-j>"; key = "<A-j>";
action = "<cmd>m .+1<cr>=="; action = "<cmd>m .+1<cr>==";
options = {desc = "Move Down";}; options = {
desc = "Move Down";
};
} }
{ {
mode = "n"; mode = "n";
key = "<A-k>"; key = "<A-k>";
action = "<cmd>m .-2<cr>=="; action = "<cmd>m .-2<cr>==";
options = {desc = "Move Up";}; options = {
desc = "Move Up";
};
} }
{ {
mode = "i"; mode = "i";
key = "<A-j>"; key = "<A-j>";
action = "<esc><cmd>m .+1<cr>==gi"; action = "<esc><cmd>m .+1<cr>==gi";
options = {desc = "Move Down";}; options = {
desc = "Move Down";
};
} }
{ {
mode = "i"; mode = "i";
key = "<A-k>"; key = "<A-k>";
action = "<esc><cmd>m .-2<cr>==gi"; action = "<esc><cmd>m .-2<cr>==gi";
options = {desc = "Move Up";}; options = {
desc = "Move Up";
};
} }
{ {
mode = "v"; mode = "v";
key = "<A-j>"; key = "<A-j>";
action = ":m '>+1<cr>gv=gv"; action = ":m '>+1<cr>gv=gv";
options = {desc = "Move Down";}; options = {
desc = "Move Down";
};
} }
{ {
mode = "v"; mode = "v";
key = "<A-k>"; key = "<A-k>";
action = ":m '<-2<cr>gv=gv"; action = ":m '<-2<cr>gv=gv";
options = {desc = "Move Up";}; options = {
desc = "Move Up";
};
} }
{ {
mode = "i"; mode = "i";
@ -150,22 +182,36 @@
action = ";<c-g>u"; action = ";<c-g>u";
} }
{ {
mode = ["i" "x" "n" "s"]; mode = [
"i"
"x"
"n"
"s"
];
key = "<C-s>"; key = "<C-s>";
action = "<cmd>w<cr><esc>"; action = "<cmd>w<cr><esc>";
options = {desc = "Save File";}; options = {
desc = "Save File";
};
} }
{ {
mode = ["i" "n"]; mode = [
"i"
"n"
];
key = "<esc>"; key = "<esc>";
action = "<cmd>noh<cr><esc>"; action = "<cmd>noh<cr><esc>";
options = {desc = "Escape and Clear hlsearch";}; options = {
desc = "Escape and Clear hlsearch";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader>ur"; key = "<leader>ur";
action = "<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>"; action = "<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>";
options = {desc = "Redraw / Clear hlsearch / Diff Update";}; options = {
desc = "Redraw / Clear hlsearch / Diff Update";
};
} }
{ {
mode = "n"; mode = "n";
@ -225,91 +271,121 @@
mode = "n"; mode = "n";
key = "<leader>cd"; key = "<leader>cd";
action = "vim.diagnostic.open_float"; action = "vim.diagnostic.open_float";
options = {desc = "Line Diagnostics";}; options = {
desc = "Line Diagnostics";
};
} }
{ {
mode = "n"; mode = "n";
key = "]d"; key = "]d";
action = "diagnostic_goto(true)"; action = "diagnostic_goto(true)";
options = {desc = "Next Diagnostic";}; options = {
desc = "Next Diagnostic";
};
} }
{ {
mode = "n"; mode = "n";
key = "[d"; key = "[d";
action = "diagnostic_goto(false)"; action = "diagnostic_goto(false)";
options = {desc = "Prev Diagnostic";}; options = {
desc = "Prev Diagnostic";
};
} }
{ {
mode = "n"; mode = "n";
key = "]e"; key = "]e";
action = "diagnostic_goto(true 'ERROR')"; action = "diagnostic_goto(true 'ERROR')";
options = {desc = "Next Error";}; options = {
desc = "Next Error";
};
} }
{ {
mode = "n"; mode = "n";
key = "[e"; key = "[e";
action = "diagnostic_goto(false 'ERROR')"; action = "diagnostic_goto(false 'ERROR')";
options = {desc = "Prev Error";}; options = {
desc = "Prev Error";
};
} }
{ {
mode = "n"; mode = "n";
key = "]w"; key = "]w";
action = "diagnostic_goto(true 'WARN')"; action = "diagnostic_goto(true 'WARN')";
options = {desc = "Next Warning";}; options = {
desc = "Next Warning";
};
} }
{ {
mode = "n"; mode = "n";
key = "[w"; key = "[w";
action = "diagnostic_goto(false 'WARN')"; action = "diagnostic_goto(false 'WARN')";
options = {desc = "Prev Warning";}; options = {
desc = "Prev Warning";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader>qq"; key = "<leader>qq";
action = "<cmd>qa<cr>"; action = "<cmd>qa<cr>";
options = {desc = "Quit All";}; options = {
desc = "Quit All";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader>ui"; key = "<leader>ui";
action = "vim.show_pos"; action = "vim.show_pos";
options = {desc = "Inspect Pos";}; options = {
desc = "Inspect Pos";
};
} }
{ {
mode = "t"; mode = "t";
key = "<esc><esc>"; key = "<esc><esc>";
action = "<c-\\><c-n>"; action = "<c-\\><c-n>";
options = {desc = "Enter Normal Mode";}; options = {
desc = "Enter Normal Mode";
};
} }
{ {
mode = "t"; mode = "t";
key = "<C-h>"; key = "<C-h>";
action = "<cmd>wincmd h<cr>"; action = "<cmd>wincmd h<cr>";
options = {desc = "Go to Left Window";}; options = {
desc = "Go to Left Window";
};
} }
{ {
mode = "t"; mode = "t";
key = "<C-j>"; key = "<C-j>";
action = "<cmd>wincmd j<cr>"; action = "<cmd>wincmd j<cr>";
options = {desc = "Go to Lower Window";}; options = {
desc = "Go to Lower Window";
};
} }
{ {
mode = "t"; mode = "t";
key = "<C-k>"; key = "<C-k>";
action = "<cmd>wincmd k<cr>"; action = "<cmd>wincmd k<cr>";
options = {desc = "Go to Upper Window";}; options = {
desc = "Go to Upper Window";
};
} }
{ {
mode = "t"; mode = "t";
key = "<C-l>"; key = "<C-l>";
action = "<cmd>wincmd l<cr>"; action = "<cmd>wincmd l<cr>";
options = {desc = "Go to Right Window";}; options = {
desc = "Go to Right Window";
};
} }
{ {
mode = "t"; mode = "t";
key = "<C-/>"; key = "<C-/>";
action = "<cmd>close<cr>"; action = "<cmd>close<cr>";
options = {desc = "Hide Terminal";}; options = {
desc = "Hide Terminal";
};
} }
{ {
mode = "n"; mode = "n";
@ -369,37 +445,49 @@
mode = "n"; mode = "n";
key = "<leader><tab>l"; key = "<leader><tab>l";
action = "<cmd>tablast<cr>"; action = "<cmd>tablast<cr>";
options = {desc = "Last Tab";}; options = {
desc = "Last Tab";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader><tab>f"; key = "<leader><tab>f";
action = "<cmd>tabfirst<cr>"; action = "<cmd>tabfirst<cr>";
options = {desc = "First Tab";}; options = {
desc = "First Tab";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader><tab><tab>"; key = "<leader><tab><tab>";
action = "<cmd>tabnew<cr>"; action = "<cmd>tabnew<cr>";
options = {desc = "New Tab";}; options = {
desc = "New Tab";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader><tab>]"; key = "<leader><tab>]";
action = "<cmd>tabnext<cr>"; action = "<cmd>tabnext<cr>";
options = {desc = "Next Tab";}; options = {
desc = "Next Tab";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader><tab>d"; key = "<leader><tab>d";
action = "<cmd>tabclose<cr>"; action = "<cmd>tabclose<cr>";
options = {desc = "Close Tab";}; options = {
desc = "Close Tab";
};
} }
{ {
mode = "n"; mode = "n";
key = "<leader><tab>["; key = "<leader><tab>[";
action = "<cmd>tabprevious<cr>"; action = "<cmd>tabprevious<cr>";
options = {desc = "Previous Tab";}; options = {
desc = "Previous Tab";
};
} }
]; ];
} }

View file

@ -2,7 +2,10 @@
plugins.nvim-autopairs = { plugins.nvim-autopairs = {
enable = true; enable = true;
settings = { settings = {
disable_filetype = ["TelescopePrompt" "vim"]; disable_filetype = [
"TelescopePrompt"
"vim"
];
}; };
}; };
} }

View file

@ -4,8 +4,12 @@
}; };
plugins.copilot-lua = { plugins.copilot-lua = {
enable = true; enable = true;
suggestion = {enabled = false;}; suggestion = {
panel = {enabled = false;}; enabled = false;
};
panel = {
enabled = false;
};
}; };
extraConfigLua = '' extraConfigLua = ''

View file

@ -1,28 +1,40 @@
{ {
plugins = { plugins = {
cmp-emoji = {enable = true;}; cmp-emoji = {
enable = true;
};
cmp = { cmp = {
enable = true; enable = true;
settings = { settings = {
autoEnableSources = true; autoEnableSources = true;
experimental = {ghost_text = false;}; experimental = {
ghost_text = false;
};
performance = { performance = {
debounce = 60; debounce = 60;
fetchingTimeout = 200; fetchingTimeout = 200;
maxViewEntries = 30; maxViewEntries = 30;
}; };
snippet = {expand = "luasnip";}; snippet = {
formatting = {fields = ["kind" "abbr" "menu"];}; expand = "luasnip";
};
formatting = {
fields = [
"kind"
"abbr"
"menu"
];
};
sources = [ sources = [
{name = "git";} { name = "git"; }
{name = "nvim_lsp";} { name = "nvim_lsp"; }
{name = "emoji";} { name = "emoji"; }
{ {
name = "buffer"; # text within current buffer name = "buffer"; # text within current buffer
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs"; option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
keywordLength = 3; keywordLength = 3;
} }
{name = "copilot";} { name = "copilot"; }
{ {
name = "path"; # file system paths name = "path"; # file system paths
keywordLength = 3; keywordLength = 3;
@ -34,8 +46,12 @@
]; ];
window = { window = {
completion = {border = "solid";}; completion = {
documentation = {border = "solid";}; border = "solid";
};
documentation = {
border = "solid";
};
}; };
mapping = { mapping = {
@ -51,11 +67,21 @@
}; };
}; };
}; };
cmp-nvim-lsp = {enable = true;}; # lsp cmp-nvim-lsp = {
cmp-buffer = {enable = true;}; enable = true;
cmp-path = {enable = true;}; # file system paths }; # lsp
cmp_luasnip = {enable = true;}; # snippets cmp-buffer = {
cmp-cmdline = {enable = false;}; # autocomplete for cmdline enable = true;
};
cmp-path = {
enable = true;
}; # file system paths
cmp_luasnip = {
enable = true;
}; # snippets
cmp-cmdline = {
enable = false;
}; # autocomplete for cmdline
}; };
extraConfigLua = '' extraConfigLua = ''
luasnip = require("luasnip") luasnip = require("luasnip")

View file

@ -1,7 +1,7 @@
{ {
plugins = { plugins = {
indent-blankline = { indent-blankline = {
enable = true; enable = true;
}; };
}; };
} }

View file

@ -1,7 +1,12 @@
{ {
plugins.neo-tree = { plugins.neo-tree = {
enable = true; enable = true;
sources = ["filesystem" "buffers" "git_status" "document_symbols"]; sources = [
"filesystem"
"buffers"
"git_status"
"document_symbols"
];
addBlankLineAtTop = false; addBlankLineAtTop = false;
filesystem = { filesystem = {
@ -37,10 +42,12 @@
keymaps = [ keymaps = [
{ {
mode = ["n"]; mode = [ "n" ];
key = "<leader>e"; key = "<leader>e";
action = "<cmd>Neotree toggle<cr>"; action = "<cmd>Neotree toggle<cr>";
options = {desc = "Open/Close Neotree";}; options = {
desc = "Open/Close Neotree";
};
} }
]; ];
} }

View file

@ -3,11 +3,28 @@ _: {
enable = true; enable = true;
settings = { settings = {
colors = { colors = {
error = ["DiagnosticError" "ErrorMsg" "#ED8796"]; error = [
warning = ["DiagnosticWarn" "WarningMsg" "#EED49F"]; "DiagnosticError"
info = ["DiagnosticInfo" "#EED49F"]; "ErrorMsg"
default = ["Identifier" "#F5A97F"]; "#ED8796"
test = ["Identifier" "#8AADF4"]; ];
warning = [
"DiagnosticWarn"
"WarningMsg"
"#EED49F"
];
info = [
"DiagnosticInfo"
"#EED49F"
];
default = [
"Identifier"
"#F5A97F"
];
test = [
"Identifier"
"#8AADF4"
];
}; };
}; };
}; };

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
plugins.treesitter = { plugins.treesitter = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [
lazygit-nvim lazygit-nvim
]; ];

View file

@ -2,7 +2,8 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
config = { config = {
extraConfigLuaPre = extraConfigLuaPre =
# lua # lua
@ -105,8 +106,8 @@
"black" "black"
"isort" "isort"
]; ];
lua = ["stylua"]; lua = [ "stylua" ];
nix = ["nixfmt-rfc-style"]; nix = [ "nixfmt-rfc-style" ];
markdown = [ markdown = [
[ [
"prettierd" "prettierd"
@ -119,15 +120,15 @@
"prettier" "prettier"
] ]
]; ];
terraform = ["terraform_fmt"]; terraform = [ "terraform_fmt" ];
bicep = ["bicep"]; bicep = [ "bicep" ];
bash = [ bash = [
"shellcheck" "shellcheck"
"shellharden" "shellharden"
"shfmt" "shfmt"
]; ];
json = ["jq"]; json = [ "jq" ];
"_" = ["trim_whitespace"]; "_" = [ "trim_whitespace" ];
}; };
formatters = { formatters = {

View file

@ -3,7 +3,7 @@
enable = true; enable = true;
logger = { logger = {
level = "warn"; # “off”, “error”, “warn”, “info”, “debug”, “trace” 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 = { progress = {
pollRate = 0; # How and when to poll for progress messages pollRate = 0; # How and when to poll for progress messages
@ -23,7 +23,7 @@
'' ''
function(msg) return msg.lsp_client.name end function(msg) return msg.lsp_client.name end
''; '';
ignore = []; # List of LSP servers to ignore ignore = [ ]; # List of LSP servers to ignore
lsp = { lsp = {
progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size progressRingbufSize = 0; # Configure the nvim's LSP progress ring buffer size
}; };

View file

@ -1,22 +1,49 @@
{pkgs, ...}: { { pkgs, ... }:
{
plugins = { plugins = {
lsp-lines = {enable = true;}; lsp-lines = {
lsp-format = {enable = true;}; enable = true;
helm = {enable = true;}; };
lsp-format = {
enable = true;
};
helm = {
enable = true;
};
lsp = { lsp = {
enable = true; enable = true;
inlayHints = true; inlayHints = true;
servers = { servers = {
html = {enable = true;}; html = {
lua_ls = {enable = true;}; enable = true;
nil_ls = {enable = true;}; };
ts_ls = {enable = true;}; lua_ls = {
marksman = {enable = true;}; enable = true;
pyright = {enable = true;}; };
gopls = {enable = true;}; nil_ls = {
terraformls = {enable = true;}; enable = true;
ansiblels = {enable = true;}; };
jsonls = {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 = { helm_ls = {
enable = true; enable = true;
extraOptions = { extraOptions = {

View file

@ -47,17 +47,17 @@
background = true; background = true;
}; };
virtual_text = { virtual_text = {
errors = ["italic"]; errors = [ "italic" ];
hints = ["italic"]; hints = [ "italic" ];
information = ["italic"]; information = [ "italic" ];
warnings = ["italic"]; warnings = [ "italic" ];
ok = ["italic"]; ok = [ "italic" ];
}; };
underlines = { underlines = {
errors = ["underline"]; errors = [ "underline" ];
hints = ["underline"]; hints = [ "underline" ];
information = ["underline"]; information = [ "underline" ];
warnings = ["underline"]; warnings = [ "underline" ];
}; };
}; };
}; };

View file

@ -9,7 +9,10 @@ _: {
"neo-tree" "neo-tree"
]; ];
disabledFiletypes = { disabledFiletypes = {
statusline = ["startup" "alpha"]; statusline = [
"startup"
"alpha"
];
}; };
theme = "catppuccin"; theme = "catppuccin";
}; };
@ -37,7 +40,7 @@ _: {
lualine_c = [ lualine_c = [
{ {
__unkeyed-1 = "diagnostics"; __unkeyed-1 = "diagnostics";
sources = ["nvim_lsp"]; sources = [ "nvim_lsp" ];
symbols = { symbols = {
error = " "; error = " ";
warn = " "; warn = " ";

View file

@ -74,7 +74,10 @@
}; };
options = { options = {
paddings = [1 3]; paddings = [
1
3
];
}; };
parts = [ parts = [

View file

@ -1,4 +1,7 @@
{pkgs, ...}: { { pkgs, ... }:
extraPlugins = with pkgs.vimPlugins; [ {
]; extraPlugins =
with pkgs.vimPlugins;
[
];
} }

View file

@ -9,7 +9,7 @@
try_as_border = true; try_as_border = true;
}; };
}; };
surround = {}; surround = { };
}; };
}; };
} }

View file

@ -12,7 +12,7 @@
subdir = "templates"; subdir = "templates";
dateFormat = "%Y-%m-%d"; dateFormat = "%Y-%m-%d";
timeFormat = "%H:%M"; timeFormat = "%H:%M";
substitutions = {}; substitutions = { };
}; };
dailyNotes = { dailyNotes = {

View file

@ -12,51 +12,59 @@
}; };
}; };
outputs = { outputs =
nixpkgs, {
nixvim, nixpkgs,
flake-parts, nixvim,
pre-commit-hooks, flake-parts,
... pre-commit-hooks,
} @ inputs: ...
flake-parts.lib.mkFlake {inherit inputs;} { }@inputs:
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"]; flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
perSystem = { perSystem =
system, {
pkgs, system,
self', pkgs,
lib, self',
... lib,
}: let ...
nixvim' = nixvim.legacyPackages.${system}; }:
nvim = nixvim'.makeNixvimWithModule { let
inherit pkgs; nixvim' = nixvim.legacyPackages.${system};
module = ./config; nvim = nixvim'.makeNixvimWithModule {
}; inherit pkgs;
in { module = ./config;
checks = {
default = pkgs.nixvimLib.check.mkTestDerivationFromNvim {
inherit nvim;
name = "A nixvim configuration";
}; };
pre-commit-check = pre-commit-hooks.lib.${system}.run { in
src = ./.; {
hooks = { checks = {
statix.enable = true; default = pkgs.nixvimLib.check.mkTestDerivationFromNvim {
nixfmt-rfc-style.enable = true; 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;};
};
};
}; };
} }