Merge branch 'main' of paperclover.dev:nix/config

This commit is contained in:
Natalie 2025-08-05 09:32:00 -07:00
commit e5fab6cb18
No known key found for this signature in database
GPG key ID: 61F4EAEB0C9C3D5F
2 changed files with 151 additions and 3 deletions

147
; Normal file
View file

@ -0,0 +1,147 @@
{
flake,
user,
host,
pkgs,
...
}:
{
vim = {
extraPackages = with pkgs; [
python312Packages.pylatexenc
];
languages = {
python.format.type = "ruff";
markdown = {
enable = true;
extensions.render-markdown-nvim = {
enable = true;
};
};
};
formatter.conform-nvim = {
enable = true;
setupOpts = {
formatters_by_ft = {
fish = [ "fish_indent" ];
tex = [ "latexindent" ];
};
};
};
diagnostics = {
enable = true;
config = {
virtual_text = {
format = pkgs.lib.generators.mkLuaInline ''
function(diagnostic)
return string.format("%s (%s)", diagnostic.message, diagnostic.source)
end
'';
};
};
nvim-lint = {
enable = true;
linters_by_ft = {
nix = [ "statix" ];
tex = [ "chktex" ];
haskell = [ "hlint" ];
};
linters = {
chktex = {
ignore_exitcode = true;
};
};
};
};
treesitter = {
enable = true;
fold = true;
addDefaultGrammars = true;
highlight = {
additionalVimRegexHighlighting = true;
};
grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
markdown_inline
markdown
];
highlight.enable = true;
indent.enable = false;
};
visuals = {
fidget-nvim = {
setupOpts = {
logger.level = "trace";
};
};
};
ui = {
nvim-ufo = {
enable = true;
};
};
autocomplete.blink-cmp = {
enable = true;
mappings = {
close = null;
complete = null;
confirm = null;
next = null;
previous = null;
scrollDocsDown = null;
scrollDocsUp = null;
};
setupOpts = {
keymap = {
preset = "super-tab";
};
completion = {
ghost_text.enabled = false;
list.selection.preselect = true;
trigger = {
show_in_snippet = true;
};
accept.auto_brackets.enabled = true;
};
signature = {
enabled = true;
};
};
};
lazy.plugins."blink.pairs" = {
enabled = true;
package = pkgs.vimPlugins.blink-pairs;
setupModule = "blink.pairs";
setupOpts = {
mappings = {
# -- you can call require("blink.pairs.mappings").enable() and require("blink.pairs.mappings").disable() to enable/disable mappings at runtime
enabled = true;
# -- see the defaults: https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#L10
pairs = [ ];
};
highlights = {
enabled = true;
groups = [
"BlinkPairsOrange"
"BlinkPairsPurple"
"BlinkPairsBlue"
];
matchparen = {
enabled = true;
group = "MatchParen";
};
};
debug = false;
};
};
};
}

View file

@ -102,7 +102,6 @@
lua.enable = true;
# sort-lines: off
ts.format.enable = true; # deno fmt is enabled elsewhere
nix = {
enable = true;
format.type = "nixfmt"; # looks so much nicer
@ -110,15 +109,17 @@
};
formatter.conform-nvim = {
enable = true;
setupOpts.formatters_by_ft = {
setupOpts = {
formatters_by_ft = {
typescript = [ "deno_fmt" ];
typescriptreact = [ "deno_fmt" ];
javascript = [ "deno_fmt" ];
javascriptreact = [ "deno_fmt" ];
};
setupOpts.formatters.deno_fmt = {
formatters.deno_fmt = {
command = lib.meta.getExe pkgs.deno;
};
};
};
filetree = {
neo-tree = {