updates
This commit is contained in:
parent
52af6ce142
commit
866298a4f1
5 changed files with 168 additions and 64 deletions
147
;
Normal file
147
;
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
55
flake.lock
55
flake.lock
|
@ -83,7 +83,10 @@
|
||||||
},
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": [
|
||||||
|
"nvf",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749398372,
|
"lastModified": 1749398372,
|
||||||
|
@ -137,7 +140,10 @@
|
||||||
},
|
},
|
||||||
"flake-utils_3": {
|
"flake-utils_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_3"
|
"systems": [
|
||||||
|
"nvf",
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1731533236,
|
||||||
|
@ -155,7 +161,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_4": {
|
"flake-utils_4": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_5"
|
"systems": "systems_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -173,7 +179,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_5": {
|
"flake-utils_5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_6"
|
"systems": "systems_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710146030,
|
"lastModified": 1710146030,
|
||||||
|
@ -191,7 +197,7 @@
|
||||||
},
|
},
|
||||||
"flake-utils_6": {
|
"flake-utils_6": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_7"
|
"systems": "systems_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1705309234,
|
"lastModified": 1705309234,
|
||||||
|
@ -389,21 +395,6 @@
|
||||||
"type": "github"
|
"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": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1751984180,
|
"lastModified": 1751984180,
|
||||||
|
@ -459,18 +450,19 @@
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"systems": "systems_4"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752075018,
|
"lastModified": 1753085278,
|
||||||
"narHash": "sha256-RJnQJooI1Jc7U4gvEKErbiIcgqGtEeUWddvxIjQfP58=",
|
"narHash": "sha256-jOGYaMh4KBhzTqer3G66ki17CL7e822PExkcgWiQoWE=",
|
||||||
"owner": "notashelf",
|
"owner": "notashelf",
|
||||||
"repo": "nvf",
|
"repo": "nvf",
|
||||||
"rev": "9aa90885640d19b1375e6dec75c6cb125ac0f0c2",
|
"rev": "08991be77a9f641facbddeca619388727661427d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "notashelf",
|
"owner": "notashelf",
|
||||||
|
"ref": "v0.8",
|
||||||
"repo": "nvf",
|
"repo": "nvf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -698,21 +690,6 @@
|
||||||
"type": "github"
|
"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": {
|
"zen-browser": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
||||||
apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
|
apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nvf.url = "github:notashelf/nvf";
|
nvf.url = "github:notashelf/nvf/v0.8";
|
||||||
nvf.inputs.nixpkgs.follows = "nixpkgs";
|
nvf.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
darwin.url = "github:lnl7/nix-darwin/master";
|
darwin.url = "github:lnl7/nix-darwin/master";
|
||||||
|
|
|
@ -101,24 +101,24 @@
|
||||||
lua.enable = true;
|
lua.enable = true;
|
||||||
# sort-lines: off
|
# sort-lines: off
|
||||||
|
|
||||||
ts.format.enable = true; # deno fmt is enabled elsewhere
|
|
||||||
nix = {
|
nix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
format.type = "nixfmt"; # looks so much nicer
|
format.type = "nixfmt"; # looks so much nicer
|
||||||
lsp.options.autoArchive = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
formatter.conform-nvim = {
|
formatter.conform-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
setupOpts.formatters_by_ft = {
|
setupOpts = {
|
||||||
|
formatters_by_ft = {
|
||||||
typescript = [ "deno_fmt" ];
|
typescript = [ "deno_fmt" ];
|
||||||
typescriptreact = [ "deno_fmt" ];
|
typescriptreact = [ "deno_fmt" ];
|
||||||
javascript = [ "deno_fmt" ];
|
javascript = [ "deno_fmt" ];
|
||||||
javascriptreact = [ "deno_fmt" ];
|
javascriptreact = [ "deno_fmt" ];
|
||||||
};
|
};
|
||||||
setupOpts.formatters.deno_fmt = {
|
formatters.deno_fmt = {
|
||||||
command = lib.meta.getExe pkgs.deno;
|
command = lib.meta.getExe pkgs.deno;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
filetree = {
|
filetree = {
|
||||||
neo-tree = {
|
neo-tree = {
|
||||||
|
|
20
test.ts
20
test.ts
|
@ -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
|
|
||||||
);
|
|
Loading…
Reference in a new issue