This commit is contained in:
Natalie Marks 2025-08-02 14:36:50 -07:00
parent 52af6ce142
commit 866298a4f1
No known key found for this signature in database
GPG key ID: 61F4EAEB0C9C3D5F
5 changed files with 168 additions and 64 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

@ -83,7 +83,10 @@
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
"nixpkgs-lib": [
"nvf",
"nixpkgs"
]
},
"locked": {
"lastModified": 1749398372,
@ -137,7 +140,10 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
"systems": [
"nvf",
"systems"
]
},
"locked": {
"lastModified": 1731533236,
@ -155,7 +161,7 @@
},
"flake-utils_4": {
"inputs": {
"systems": "systems_5"
"systems": "systems_4"
},
"locked": {
"lastModified": 1705309234,
@ -173,7 +179,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_6"
"systems": "systems_5"
},
"locked": {
"lastModified": 1710146030,
@ -191,7 +197,7 @@
},
"flake-utils_6": {
"inputs": {
"systems": "systems_7"
"systems": "systems_6"
},
"locked": {
"lastModified": 1705309234,
@ -389,21 +395,6 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1748740939,
"narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1751984180,
@ -459,18 +450,19 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_4"
"systems": "systems_3"
},
"locked": {
"lastModified": 1752075018,
"narHash": "sha256-RJnQJooI1Jc7U4gvEKErbiIcgqGtEeUWddvxIjQfP58=",
"lastModified": 1753085278,
"narHash": "sha256-jOGYaMh4KBhzTqer3G66ki17CL7e822PExkcgWiQoWE=",
"owner": "notashelf",
"repo": "nvf",
"rev": "9aa90885640d19b1375e6dec75c6cb125ac0f0c2",
"rev": "08991be77a9f641facbddeca619388727661427d",
"type": "github"
},
"original": {
"owner": "notashelf",
"ref": "v0.8",
"repo": "nvf",
"type": "github"
}
@ -698,21 +690,6 @@
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": [

View file

@ -12,7 +12,7 @@
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
nvf.url = "github:notashelf/nvf";
nvf.url = "github:notashelf/nvf/v0.8";
nvf.inputs.nixpkgs.follows = "nixpkgs";
darwin.url = "github:lnl7/nix-darwin/master";

View file

@ -101,24 +101,24 @@
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
lsp.options.autoArchive = true;
};
};
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 = {

20
test.ts
View file

@ -1,20 +0,0 @@
const option = collectionDetails
.fields
.find(
(field): field is { type: "Option", slug: string, validations: WebflowValidations["Option"] } =>
field.slug === fieldData.path
)!
.validations;
if (fieldData.type
"Option" && typeof rawValue
"string")
return (
(
collectionDetails.fields. find (predicate: (field) field.slug
| WebflowValidations["Option"]
| undefined
fieldData.path) ?. validations as
)?. options.find(predicate: (option) option.id
rawValue) ?. name ?? fullMatch
);