Compare commits
30 commits
48b23bdae0
...
851399eebd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
851399eebd | ||
|
|
3d7bcda3d1 | ||
|
|
5ae23bff4e | ||
|
|
2ca0f6b7bc | ||
|
|
1b5d59e466 | ||
|
|
246781838c | ||
|
|
d61584cc4c | ||
|
|
df9d3637e8 | ||
|
|
33e1f1d444 | ||
|
|
991761bc6a | ||
|
|
63c9576037 | ||
|
|
e3e6ba21ab | ||
|
|
ff75a5d3cc | ||
|
|
51ae991376 | ||
|
|
db0fa29513 | ||
|
|
4a6d561362 | ||
|
|
56f03c4313 | ||
|
|
fe10a072ec | ||
|
|
1d333fc92e | ||
|
|
aca6fcdaff | ||
|
|
db8177775e | ||
|
|
d2a0db38b7 | ||
|
|
c1e8e859aa | ||
|
|
a50121bad2 | ||
|
|
2a3eece6af | ||
|
|
779734a9fd | ||
|
|
66a5dc70e2 | ||
|
|
793f22ff3d | ||
|
|
cfa1df0088 | ||
|
|
d8acad9865 |
69 changed files with 541 additions and 165 deletions
|
|
@ -19,7 +19,7 @@ let
|
|||
|> builtins.attrValues
|
||||
|> builtins.filter (entry: entry.variant or null == "primary")
|
||||
|> builtins.filter (entry: builtins.elem entry.status supported)
|
||||
|> builtins.map (entry: {
|
||||
|> map (entry: {
|
||||
name = entry.channel |> builtins.match "nixos-(.+)" |> builtins.head;
|
||||
value = {
|
||||
inherit (entry) channel status;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
docsUrl ? "https://nix-community.github.io/nixvim/",
|
||||
}:
|
||||
src:
|
||||
runCommand (src.name or (builtins.baseNameOf src))
|
||||
runCommand (src.name or (baseNameOf src))
|
||||
{
|
||||
inherit src;
|
||||
bindings =
|
||||
|
|
|
|||
|
|
@ -25,10 +25,10 @@ let
|
|||
builtins.concatMap (
|
||||
node:
|
||||
let
|
||||
children = builtins.removeAttrs node [ "_page" ];
|
||||
children = removeAttrs node [ "_page" ];
|
||||
in
|
||||
lib.optional (node ? _page) node._page ++ lib.optionals (children != { }) (collectPages children)
|
||||
) (builtins.attrValues (builtins.removeAttrs pages [ "_category" ]));
|
||||
) (builtins.attrValues (removeAttrs pages [ "_category" ]));
|
||||
|
||||
# Normalised page specs
|
||||
pageList = collectPages pages;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ let
|
|||
value =
|
||||
let
|
||||
file = removeNixvimPrefix location.file;
|
||||
line = builtins.toString location.line;
|
||||
line = toString location.line;
|
||||
text = "${file}:${line}";
|
||||
target = "${urlPrefix}/${file}#L${line}";
|
||||
in
|
||||
|
|
@ -80,6 +80,6 @@ lib.pipe functionSet [
|
|||
# No need to include out-of-tree entries
|
||||
(builtins.filter (entry: lib.strings.hasPrefix rootPathString entry.location.file))
|
||||
# Convert entries to attrset
|
||||
(builtins.map entryToNameValuePair)
|
||||
(map entryToNameValuePair)
|
||||
builtins.listToAttrs
|
||||
]
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ let
|
|||
# whether to nest into a sub-page, so that we can keep the original
|
||||
# _freeformOptions attr as intended.
|
||||
attrs._freeformOptions or { }
|
||||
// builtins.removeAttrs attrs [
|
||||
// removeAttrs attrs [
|
||||
"_module"
|
||||
"_freeformOptions"
|
||||
"warnings"
|
||||
|
|
@ -96,7 +96,7 @@ let
|
|||
let
|
||||
info = lib.attrByPath path { } nixvimInfo;
|
||||
maintainers = lib.unique (configuration.config.meta.maintainers.${info.file} or [ ]);
|
||||
maintainersNames = builtins.map maintToMD maintainers;
|
||||
maintainersNames = map maintToMD maintainers;
|
||||
maintToMD = m: if m ? github then "[${m.name}](https://github.com/${m.github})" else m.name;
|
||||
in
|
||||
# Make sure this path has a valid info attrset
|
||||
|
|
@ -304,7 +304,7 @@ let
|
|||
|
||||
# Attrset of { filePath = renderedDocs; }
|
||||
platformOptionsFiles = lib.listToAttrs (
|
||||
builtins.map (
|
||||
map (
|
||||
{ path, file, ... }:
|
||||
{
|
||||
name = path;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ let
|
|||
modules = [ ./page.nix ];
|
||||
};
|
||||
|
||||
pages = builtins.removeAttrs config (builtins.attrNames options);
|
||||
pages = removeAttrs config (builtins.attrNames options);
|
||||
in
|
||||
{
|
||||
freeformType = lib.types.attrsOf pageType;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ let
|
|||
modules = [ ./category.nix ];
|
||||
};
|
||||
|
||||
categories = builtins.removeAttrs config (builtins.attrNames options);
|
||||
categories = removeAttrs config (builtins.attrNames options);
|
||||
in
|
||||
{
|
||||
freeformType = lib.types.attrsOf categoryType;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ let
|
|||
nextPrefix = if showInMenu then loc else prefix;
|
||||
nextIndent = if showInMenu && nested then indent + " " else indent;
|
||||
|
||||
children = builtins.removeAttrs page optionNames;
|
||||
children = removeAttrs page optionNames;
|
||||
submenu = lib.pipe children [
|
||||
builtins.attrValues
|
||||
(map (
|
||||
|
|
|
|||
|
|
@ -190,3 +190,9 @@ owner = "nicklundin08"
|
|||
title = "dots"
|
||||
description = "Nicks dotfiles"
|
||||
url = "https://github.com/nicklundin08/dots/blob/main/home-manager/home.nix"
|
||||
|
||||
[[config]]
|
||||
owner = "literally-sai"
|
||||
title = "vermvim"
|
||||
description = "nixvim flake, with custom base16 loader"
|
||||
url = "https://github.com/literally-sai/vermvim"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
drv, # The derivation under test
|
||||
}:
|
||||
let
|
||||
toFile = name: v: if lib.isPath v then v else writeText name v;
|
||||
mkFile = name: v: if lib.isPath v then v else writeText name v;
|
||||
|
||||
overrideSrc =
|
||||
src:
|
||||
|
|
@ -21,8 +21,8 @@ let
|
|||
}:
|
||||
testers.testEqualContents {
|
||||
assertion = message;
|
||||
actual = overrideSrc (toFile "${message}-input" input);
|
||||
expected = toFile "${message}-expected" expected;
|
||||
actual = overrideSrc (mkFile "${message}-input" input);
|
||||
expected = mkFile "${message}-expected" expected;
|
||||
};
|
||||
in
|
||||
# TODO: introduce some negative cases for input that should fail
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ You could use the builtin [`map`] function (or similar) to do something like thi
|
|||
```nix
|
||||
{
|
||||
keymaps =
|
||||
(builtins.map (key: {
|
||||
(map (key: {
|
||||
inherit key;
|
||||
action = "<some-action>";
|
||||
options.desc = "My cool keymapping";
|
||||
|
|
|
|||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1766125104,
|
||||
"narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=",
|
||||
"lastModified": 1767026758,
|
||||
"narHash": "sha256-7fsac/f7nh/VaKJ/qm3I338+wAJa/3J57cOGpXi0Sbg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7d853e518814cca2a657b72eeba67ae20ebf7059",
|
||||
"rev": "346dd96ad74dc4457a9db9de4f4f57dab2e5731d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mapAttrs
|
||||
types
|
||||
;
|
||||
in
|
||||
|
|
@ -39,7 +38,7 @@ in
|
|||
|
||||
# Transpose per-system definitions to the top-level
|
||||
config.ci = {
|
||||
buildbot = mapAttrs (_: sysCfg: sysCfg.ci.buildbot) config.allSystems;
|
||||
buildbot = builtins.mapAttrs (_: sysCfg: sysCfg.ci.buildbot) config.allSystems;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
31
flake/dev/flake.lock
generated
31
flake/dev/flake.lock
generated
|
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"dev-nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1766125104,
|
||||
"narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=",
|
||||
"lastModified": 1767026758,
|
||||
"narHash": "sha256-7fsac/f7nh/VaKJ/qm3I338+wAJa/3J57cOGpXi0Sbg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7d853e518814cca2a657b72eeba67ae20ebf7059",
|
||||
"rev": "346dd96ad74dc4457a9db9de4f4f57dab2e5731d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -38,16 +38,15 @@
|
|||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1765186200,
|
||||
"narHash": "sha256-QN1r/zNqvXHwWqlRAnRtFf4CQwIOJx58PtdExIzAw94=",
|
||||
"lastModified": 1767039857,
|
||||
"narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"rev": "63d095ca43128741b16fc354b1e918757e6b66e5",
|
||||
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "pull/75/merge",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -122,11 +121,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1766282146,
|
||||
"narHash": "sha256-0V/nKU93KdYGi+5LB/MVo355obBJw/2z9b2xS3bPJxY=",
|
||||
"lastModified": 1767104570,
|
||||
"narHash": "sha256-GKgwu5//R+cLdKysZjGqvUEEOGXXLdt93sNXeb2M/Lk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "61fcc9de76b88e55578eb5d79fc80f2b236df707",
|
||||
"rev": "e4e78a2cbeaddd07ab7238971b16468cc1d14daf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -168,11 +167,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1766038392,
|
||||
"narHash": "sha256-ht/GuKaw5NT3M12xM+mkUtkSBVtzjJ8IHIy6R/ncv9g=",
|
||||
"lastModified": 1767028240,
|
||||
"narHash": "sha256-0/fLUqwJ4Z774muguUyn5t8AQ6wyxlNbHexpje+5hRo=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "5fb45ece6129bd7ad8f7310df0ae9c00bae7c562",
|
||||
"rev": "c31afa6e76da9bbc7c9295e39c7de9fca1071ea1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -237,11 +236,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1766000401,
|
||||
"narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=",
|
||||
"lastModified": 1767122417,
|
||||
"narHash": "sha256-yOt/FTB7oSEKQH9EZMFMeuldK1HGpQs2eAzdS9hNS/o=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd",
|
||||
"rev": "dec15f37015ac2e774c84d0952d57fcdf169b54d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@
|
|||
dev-nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
# flake-compat is used by the root `default.nix` to allow non-flake users to import nixvim
|
||||
#
|
||||
# The pinned PR resolves an issue with shallow clones, such as those used by CI.
|
||||
flake-compat.url = "github:NixOS/flake-compat?ref=pull/75/merge";
|
||||
flake-compat.url = "github:NixOS/flake-compat";
|
||||
|
||||
# keep-sorted start block=yes newline_separated=yes
|
||||
devshell = {
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@
|
|||
formatter.nixf-diagnose.options = [
|
||||
"--auto-fix"
|
||||
"--ignore=sema-unused-def-lambda-witharg-formal"
|
||||
"--ignore=sema-primop-overridden"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,13 +3,16 @@
|
|||
config,
|
||||
lib,
|
||||
withSystem,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Public `lib` flake output
|
||||
flake.lib = {
|
||||
nixvim = lib.makeOverridable ({ lib }: (lib.extend self.lib.overlay).nixvim) {
|
||||
inherit lib;
|
||||
# NOTE: Use the lib from nixpkgs pin to prevent a dependency
|
||||
# on pinning the flake-parts nixpkgs-lib to the nixpkgs pin
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
};
|
||||
overlay = import ../lib/overlay.nix {
|
||||
flake = self;
|
||||
|
|
|
|||
|
|
@ -250,19 +250,6 @@
|
|||
name = "Jakob Beckmann";
|
||||
source = "nixpkgs";
|
||||
};
|
||||
foo-dogsquared = {
|
||||
email = "foodogsquared@foodogsquared.one";
|
||||
github = "foo-dogsquared";
|
||||
githubId = 34962634;
|
||||
keys = [
|
||||
{
|
||||
fingerprint = "DDD7 D0BD 602E 564B AA04 FC35 1431 0D91 4115 2B92";
|
||||
}
|
||||
];
|
||||
matrix = "@foodogsquared:matrix.org";
|
||||
name = "Gabriel Arazas";
|
||||
source = "nixpkgs";
|
||||
};
|
||||
fwastring = {
|
||||
email = "fredrik@wastring.com";
|
||||
github = "fwastring";
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@
|
|||
"gawk",
|
||||
"gci",
|
||||
"gdformat",
|
||||
"gdscript-formatter",
|
||||
"gersemi",
|
||||
"ghdl",
|
||||
"ghokin",
|
||||
|
|
@ -150,6 +151,7 @@
|
|||
"oxfmt",
|
||||
"oxlint",
|
||||
"packer_fmt",
|
||||
"palantir-java-format",
|
||||
"pangu",
|
||||
"perlimports",
|
||||
"perltidy",
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@
|
|||
"hie": "https://github.com/haskell/haskell-ide-engine the following init_options\nare supported (see\nhttps://github.com/haskell/haskell-ide-engine#configuration):\n\n``` lua\ninit_options = {\n languageServerHaskell = {\n hlintOn = bool;\n maxNumberOfProblems = number;\n diagnosticsDebounceDuration = number;\n liquidOn = bool (default false);\n completionSnippetsOn = bool (default true);\n formatOnImportOn = bool (default true);\n formattingProvider = string (default \"brittany\", alternate \"floskell\");\n }\n}\n```",
|
||||
"hlasm": "`hlasm_language_server` is a language server for the High Level\nAssembler language used on IBM SystemZ mainframes. To learn how to\nconfigure the HLASM language server, see the [HLASM Language Support\ndocumentation](https://github.com/eclipse-che4z/che-che4z-lsp-for-hlasm).",
|
||||
"hls": "https://github.com/haskell/haskell-language-server Haskell Language\nServer If you are using HLS 1.9.0.0, enable the language server to\nlaunch on Cabal files as well:\n\n``` lua\nvim.lsp.config('hls', {\n filetypes = { 'haskell', 'lhaskell', 'cabal' },\n})\n```",
|
||||
"home_assistant": "https://github.com/keesschollaart81/vscode-home-assistant\n`vscode-home-assistant` can be installed via from source or by\ndownloading and extracting the VSCode \"Home Assistant Config Helper\"\nextension `vscode-home-assistant` is a language server for Home\nAssistant ported from the VSCode \"Home Assistant Config Helper\"\nextension.",
|
||||
"hoon_ls": "https://github.com/urbit/hoon-language-server A language server for\nHoon. The language server can be installed via\n`npm install -g @hoon-language-server` Start a fake \\~zod with\n`urbit -F zod`. Start the language server at the Urbit Dojo prompt with:\n`|start %language-server`",
|
||||
"html": "https://github.com/hrsh7th/vscode-langservers-extracted\n`vscode-html-language-server` can be installed via `npm`:\n\n``` sh\nnpm i -g vscode-langservers-extracted\n```\n\nNeovim does not currently include built-in snippets.\n`vscode-html-language-server` only provides completions when snippet\nsupport is enabled. To enable completion, install a snippet plugin and\nadd the following override to your language client capabilities during\nsetup. The code-formatting feature of the lsp can be controlled with the\n`provideFormatter` option.\n\n``` lua\n--Enable (broadcasting) snippet capability for completion\nlocal capabilities = vim.lsp.protocol.make_client_capabilities()\ncapabilities.textDocument.completion.completionItem.snippetSupport = true\nvim.lsp.config('html', {\n capabilities = capabilities,\n})\n```",
|
||||
"htmx": "https://github.com/ThePrimeagen/htmx-lsp `htmx-lsp` can be installed via\n`cargo`:\n\n``` sh\ncargo install htmx-lsp\n```\n\nLsp is still very much work in progress and experimental. Use at your\nown risk.",
|
||||
|
|
@ -311,6 +312,7 @@
|
|||
"swift_mesonls": "https://github.com/JCWasmx86/Swift-MesonLSP Meson language server\nwritten in Swift",
|
||||
"syntax_tree": "https://ruby-syntax-tree.github.io/syntax_tree/ A fast Ruby parser and\nformatter. Syntax Tree is a suite of tools built on top of the internal\nCRuby parser. It provides the ability to generate a syntax tree from\nsource, as well as the tools necessary to inspect and manipulate that\nsyntax tree. It can be used to build formatters, linters, language\nservers, and more.\n\n``` sh\ngem install syntax_tree\n```",
|
||||
"systemd_ls": "https://github.com/psacawa/systemd-language-server\n`systemd-language-server` can be installed via `pip`:\n\n``` sh\npip install systemd-language-server\n```\n\nLanguage Server for Systemd unit files",
|
||||
"systemd_lsp": "https://github.com/JFryy/systemd-lsp A Language Server Protocol (LSP)\nimplementation for Systemd unit files, providing editing support with\nsyntax highlighting, diagnostics, autocompletion, and documentation.\n`systemd-lsp` can be installed via `cargo`:\n\n``` sh\ncargo install systemd-lsp\n```\n\nA language server implementation for Systemd unit files made in Rust.",
|
||||
"tabby_ml": "https://tabby.tabbyml.com/blog/running-tabby-as-a-language-server\nLanguage server for Tabby, an opensource, self-hosted AI coding\nassistant. `tabby-agent` can be installed via `npm`:\n\n``` sh\nnpm install --global tabby-agent\n```",
|
||||
"tailwindcss": "https://github.com/tailwindlabs/tailwindcss-intellisense Tailwind CSS\nLanguage Server can be installed via npm: npm install -g\n@tailwindcss/language-server",
|
||||
"taplo": "https://taplo.tamasfe.dev/cli/usage/language-server.html Language server\nfor Taplo, a TOML toolkit. `taplo-cli` can be installed via `cargo`:\n\n``` sh\ncargo install --features lsp --locked taplo-cli\n```",
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ rec {
|
|||
# to ensure `lua` isn't evaluated when (e.g.) generating lua code.
|
||||
# Failure to do so will result in "option used but not defined" errors!
|
||||
deprecatedMapOptionSubmodule = mkMapOptionSubmodule { lua = true; };
|
||||
removeDeprecatedMapAttrs = v: builtins.removeAttrs v [ "lua" ];
|
||||
removeDeprecatedMapAttrs = v: removeAttrs v [ "lua" ];
|
||||
|
||||
mkModeOption =
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ let
|
|||
options = lib.setAttrByPath loc (
|
||||
{
|
||||
enable = lib.mkEnableOption name;
|
||||
lazyLoad = lib.nixvim.mkLazyLoadOption name;
|
||||
autoLoad = lib.nixvim.mkAutoLoadOption cfg name;
|
||||
}
|
||||
// settingsOption
|
||||
|
|
@ -66,19 +67,67 @@ let
|
|||
);
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
let
|
||||
globalsConfig = lib.nixvim.applyPrefixToAttrs globalPrefix (cfg.settings or { });
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
inherit extraPackages extraPlugins;
|
||||
globals = lib.nixvim.applyPrefixToAttrs globalPrefix (cfg.settings or { });
|
||||
}
|
||||
{ inherit extraPackages extraPlugins; }
|
||||
|
||||
(lib.mkIf cfg.lazyLoad.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = (isColorscheme && colorscheme != null) || cfg.lazyLoad.settings != { };
|
||||
message = "You have enabled lazy loading for ${name} but have not provided any configuration.";
|
||||
}
|
||||
];
|
||||
|
||||
plugins.lz-n = {
|
||||
plugins = [
|
||||
(
|
||||
{
|
||||
# The packpath name is always the derivation name
|
||||
__unkeyed-1 = lib.getName cfg.package;
|
||||
# Use provided before, otherwise fallback to normal function wrapped globals config
|
||||
before =
|
||||
let
|
||||
luaGlobals = lib.nixvim.toLuaObject globalsConfig;
|
||||
before = cfg.lazyLoad.settings.before or null;
|
||||
default = lib.mkIf (luaGlobals != "{ }") ''
|
||||
function()
|
||||
local globals = ${luaGlobals}
|
||||
|
||||
for k,v in pairs(globals) do
|
||||
vim.g[k] = v
|
||||
end
|
||||
end
|
||||
'';
|
||||
in
|
||||
if (lib.isString before || lib.types.rawLua.check before) then before else default;
|
||||
colorscheme = lib.mkIf isColorscheme (cfg.lazyLoad.settings.colorscheme or colorscheme);
|
||||
}
|
||||
// lib.removeAttrs cfg.lazyLoad.settings [
|
||||
"before"
|
||||
"colorscheme"
|
||||
]
|
||||
)
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf (!cfg.lazyLoad.enable) {
|
||||
globals = globalsConfig;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs (isColorscheme && colorscheme != null) {
|
||||
colorscheme = lib.mkDefault colorscheme;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs (args ? extraConfig) (
|
||||
lib.nixvim.plugins.utils.applyExtraConfig {
|
||||
inherit extraConfig cfg opts;
|
||||
}
|
||||
))
|
||||
|
||||
(lib.nixvim.plugins.utils.enableDependencies dependencies)
|
||||
]
|
||||
);
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@
|
|||
};
|
||||
in
|
||||
lib.pipe depsToEnable [
|
||||
(builtins.map enableDepConditionally)
|
||||
(map enableDepConditionally)
|
||||
lib.listToAttrs
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -140,7 +140,6 @@ rec {
|
|||
pluginLuaConfig = types.submodule (
|
||||
{ config, ... }:
|
||||
let
|
||||
inherit (builtins) toString;
|
||||
inherit (lib.nixvim.utils) mkBeforeSection mkAfterSection;
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ rec {
|
|||
message = "${prefix} ${lib.trim a.message}";
|
||||
};
|
||||
in
|
||||
builtins.map processAssertion (lib.toList assertions);
|
||||
map processAssertion (lib.toList assertions);
|
||||
|
||||
/**
|
||||
Convert one or several conditional warnings to a final warning list.
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ in
|
|||
extraPackages = lib.pipe cfg [
|
||||
builtins.attrValues
|
||||
(builtins.filter (p: p.enable))
|
||||
(builtins.map (p: p.package))
|
||||
(map (p: p.package))
|
||||
];
|
||||
|
||||
__depPackages = {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ in
|
|||
|
||||
# NOTE: barbar added `mapOptionSubmodule` support shortly _before_ branching off 24.05
|
||||
(lib.mapAttrsToList (name: opt: opt.valueMeta) (
|
||||
builtins.removeAttrs options.plugins.barbar.keymaps [ "silent" ]
|
||||
removeAttrs options.plugins.barbar.keymaps [ "silent" ]
|
||||
))
|
||||
]
|
||||
[
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@
|
|||
"hhvm"
|
||||
"hie"
|
||||
"hlasm"
|
||||
"home_assistant"
|
||||
"hoon_ls"
|
||||
"hydra_lsp"
|
||||
"hylo_ls"
|
||||
|
|
@ -399,6 +400,7 @@
|
|||
"syntax_tree"
|
||||
];
|
||||
systemd_ls = "systemd-language-server";
|
||||
systemd_lsp = "systemd-lsp";
|
||||
tailwindcss = "tailwindcss-language-server";
|
||||
taplo = "taplo";
|
||||
tblgen_lsp_server = [
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ let
|
|||
{
|
||||
_module.args = lib.pipe options._module.args [
|
||||
lib.modules.mergeAttrDefinitionsWithPrio
|
||||
(lib.flip builtins.removeAttrs [ "name" ])
|
||||
(lib.flip removeAttrs [ "name" ])
|
||||
(lib.mapAttrs (_: { highestPrio, value }: lib.mkOverride highestPrio value))
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ lib.fix (self: {
|
|||
defaultPlugin // (if p ? plugin then p else { plugin = p; });
|
||||
|
||||
# Normalize a list of plugins
|
||||
normalizePlugins = builtins.map self.normalizePlugin;
|
||||
normalizePlugins = map self.normalizePlugin;
|
||||
|
||||
getAndNormalizeDeps = p: self.normalizePlugins (p.plugin.dependencies or [ ]);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ let
|
|||
};
|
||||
|
||||
go =
|
||||
path: name: opt:
|
||||
optPath: name: opt:
|
||||
let
|
||||
loc = path ++ lib.singleton name;
|
||||
loc = optPath ++ lib.singleton name;
|
||||
in
|
||||
if lib.isOption opt then mkAlias loc opt else lib.mapAttrs (go loc) opt;
|
||||
in
|
||||
|
|
|
|||
|
|
@ -301,8 +301,8 @@ in
|
|||
name:
|
||||
lib.pipe cfg.${name} [
|
||||
(builtins.filter (x: !x.predicate input.${name}))
|
||||
(builtins.map (x: x.message))
|
||||
(builtins.map (msg: if lib.isFunction msg then msg input.${name} else msg))
|
||||
(map (x: x.message))
|
||||
(map (msg: if lib.isFunction msg then msg input.${name} else msg))
|
||||
(
|
||||
x:
|
||||
if x == [ ] then
|
||||
|
|
|
|||
51
plugins/by-name/blink-cmp-avante/default.nix
Normal file
51
plugins/by-name/blink-cmp-avante/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "blink-cmp-avante";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
description = ''
|
||||
Avante source for blink-cmp.
|
||||
|
||||
---
|
||||
|
||||
This plugin should be configured through blink-cmp's `sources.providers` settings.
|
||||
|
||||
For example:
|
||||
|
||||
```nix
|
||||
plugins.blink-cmp = {
|
||||
enable = true;
|
||||
settings.sources.providers = {
|
||||
avante = {
|
||||
module = "blink-cmp-avante";
|
||||
name = "Avante";
|
||||
opts = {
|
||||
# options for blink-cmp-avante
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
And then you can add it to blink-cmp's `sources.default` option:
|
||||
|
||||
```nix
|
||||
plugins.blink-cmp = {
|
||||
enable = true;
|
||||
settings.sources.default = [
|
||||
"lsp"
|
||||
"path"
|
||||
"luasnip"
|
||||
"buffer"
|
||||
"avante"
|
||||
];
|
||||
};
|
||||
```
|
||||
'';
|
||||
|
||||
# Configured through blink-cmp
|
||||
callSetup = false;
|
||||
hasLuaConfig = false;
|
||||
hasSettings = false;
|
||||
}
|
||||
|
|
@ -497,7 +497,7 @@ in
|
|||
Default sources.
|
||||
'';
|
||||
|
||||
per_filetype = defaultNullOpts.mkAttrsOf (with types; listOf str) { } ''
|
||||
per_filetype = defaultNullOpts.mkAttrsOf (with types; listOf anything) { } ''
|
||||
Sources per filetype.
|
||||
'';
|
||||
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
(listOf strLua)
|
||||
)
|
||||
);
|
||||
apply = builtins.map mapToRawLua;
|
||||
apply = map mapToRawLua;
|
||||
default = [ ];
|
||||
example = [
|
||||
[
|
||||
|
|
|
|||
23
plugins/by-name/codesettings/default.nix
Normal file
23
plugins/by-name/codesettings/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "codesettings";
|
||||
package = "codesettings-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
settingsExample = {
|
||||
config_file_paths = [
|
||||
".vscode/settings.json"
|
||||
"codesettings.json"
|
||||
"lspsettings.json"
|
||||
".codesettings.json"
|
||||
".lspsettings.json"
|
||||
".nvim/codesettings.json"
|
||||
".nvim/lspsettings.json"
|
||||
];
|
||||
jsonls_integration = true;
|
||||
default_merge_opts = {
|
||||
list_behavior = "prepend";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -13,9 +13,9 @@ in
|
|||
{
|
||||
inherit states;
|
||||
formatter-packages = {
|
||||
# 2025-12-20 build failure
|
||||
# https://github.com/NixOS/nixpkgs/issues/472704
|
||||
terragrunt_hclfmt = states.broken terragrunt;
|
||||
# 2025-12-24: phpPackages.php-codesniffer is broken
|
||||
# https://github.com/NixOS/nixpkgs/pull/459254#issuecomment-3689578764
|
||||
phpcbf = states.broken php84Packages.php-codesniffer;
|
||||
|
||||
# 2025-11-15 dependency swift is broken
|
||||
# https://github.com/NixOS/nixpkgs/issues/461474
|
||||
|
|
@ -69,8 +69,8 @@ in
|
|||
mojo_format = states.unpackaged;
|
||||
nomad_fmt = states.unpackaged;
|
||||
npm-groovy-lint = states.unpackaged;
|
||||
oxfmt = states.unpackaged;
|
||||
packer_fmt = states.unpackaged;
|
||||
palantir-java-format = states.unpackaged;
|
||||
pangu = states.unpackaged;
|
||||
perlimports = states.unpackaged;
|
||||
pint = states.unpackaged;
|
||||
|
|
@ -137,7 +137,6 @@ in
|
|||
perltidy = perl538Packages.PerlTidy;
|
||||
pg_format = pgformatter;
|
||||
php_cs_fixer = php83Packages.php-cs-fixer;
|
||||
phpcbf = php84Packages.php-codesniffer;
|
||||
inherit (php84Packages) phpinsights;
|
||||
prolog = swi-prolog;
|
||||
pyproject-fmt = python313Packages.pyproject-parser;
|
||||
|
|
@ -156,6 +155,7 @@ in
|
|||
inherit (rubyPackages) syntax_tree;
|
||||
tclfmt = tclint;
|
||||
terraform_fmt = tenv;
|
||||
terragrunt_hclfmt = terragrunt;
|
||||
tofu_fmt = opentofu;
|
||||
v = vlang;
|
||||
xmlformatter = xmlformat;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
(
|
||||
lib.attrValues (
|
||||
# Rename aliases added 2025-06-25 in https://github.com/nix-community/nixvim/pull/3503
|
||||
builtins.removeAttrs cfg.languages [
|
||||
removeAttrs cfg.languages [
|
||||
"warnings"
|
||||
"HTML"
|
||||
"JSON"
|
||||
|
|
@ -208,7 +208,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
(mkToolValue "linters" linter) ++ (mkToolValue "formatters" formatter)
|
||||
)
|
||||
(
|
||||
builtins.removeAttrs cfg.languages [
|
||||
removeAttrs cfg.languages [
|
||||
"all"
|
||||
# Rename aliases added 2025-06-25 in https://github.com/nix-community/nixvim/pull/3503
|
||||
"warnings"
|
||||
|
|
|
|||
|
|
@ -19,9 +19,11 @@ lib.nixvim.plugins.mkVimPlugin {
|
|||
"plugins.blink-cmp.enable"
|
||||
"plugins.nvim-snippets.enable"
|
||||
];
|
||||
enabledConsumers = builtins.filter (path: lib.getAttrFromPath path config) snippetConsumers;
|
||||
enabledConsumers = builtins.filter (
|
||||
consumerPath: lib.getAttrFromPath consumerPath config
|
||||
) snippetConsumers;
|
||||
enabledConsumersPretty = lib.concatMapStringsSep ", " (
|
||||
path: lib.getAttrFromPath path options
|
||||
consumerPath: lib.getAttrFromPath consumerPath options
|
||||
) enabledConsumers;
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) types;
|
||||
inherit (lib.nixvim) defaultNullOpts;
|
||||
in
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "inc-rename";
|
||||
moduleName = "inc_rename";
|
||||
|
|
@ -14,47 +10,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
|
||||
maintainers = [ lib.maintainers.jolars ];
|
||||
|
||||
settingsOptions = {
|
||||
cmd_name = defaultNullOpts.mkStr "IncRename" "The name of the command.";
|
||||
|
||||
hl_group = defaultNullOpts.mkStr "Substitute" ''
|
||||
The highlight group used for highlighting the identifier's new name.
|
||||
'';
|
||||
|
||||
preview_empty_name = defaultNullOpts.mkBool false ''
|
||||
Whether an empty new name should be previewed; if false the command
|
||||
preview will be cancelled instead.
|
||||
'';
|
||||
|
||||
show_message = defaultNullOpts.mkBool true ''
|
||||
Whether to display a `Renamed m instances in n files` message after a rename operation.
|
||||
'';
|
||||
|
||||
save_in_cmdline_history = defaultNullOpts.mkBool true ''
|
||||
Whether to save the `IncRename` command in the commandline history. Set to
|
||||
false to prevent issues with navigating to older entries that may arise due to
|
||||
the behavior of command preview).
|
||||
'';
|
||||
|
||||
input_buffer_type =
|
||||
defaultNullOpts.mkNullable (with types; either (enum [ "dressing" ]) rawLua) null
|
||||
''
|
||||
The type of the external input buffer to use.
|
||||
'';
|
||||
|
||||
post_hook = defaultNullOpts.mkRaw null ''
|
||||
Callback to run after renaming, receives the result table (from LSP
|
||||
handler) as an argument.
|
||||
'';
|
||||
};
|
||||
|
||||
settingsExample = {
|
||||
input_buffer_type = "dressing";
|
||||
cmd_name = "IncRename";
|
||||
hl_group = "Substitute";
|
||||
input_buffer_type = "snacks";
|
||||
preview_empty_name = false;
|
||||
show_message.__raw = ''
|
||||
function(msg)
|
||||
vim.notify(msg, vim.log.levels.INFO, { title = "Rename" })
|
||||
end
|
||||
'';
|
||||
show_message = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
12
plugins/by-name/iswap/default.nix
Normal file
12
plugins/by-name/iswap/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "iswap";
|
||||
package = "iswap-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
settingsExample = {
|
||||
debug = true;
|
||||
move_cursor = true;
|
||||
};
|
||||
}
|
||||
10
plugins/by-name/lsp-format-modifications/default.nix
Normal file
10
plugins/by-name/lsp-format-modifications/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "lsp-format-modifications";
|
||||
package = "lsp-format-modifications-nvim";
|
||||
callSetup = false;
|
||||
hasSettings = false;
|
||||
|
||||
maintainers = [ lib.maintainers.shved ];
|
||||
description = "LSP formatting, but only on modified text regions.";
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
|
|
@ -87,12 +88,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
inherit (config.plugins) treesitter;
|
||||
highlightEnabled = treesitter.highlight.enable || (treesitter.settings.highlight.enable or false);
|
||||
in
|
||||
config.plugins.treesitter.enable -> highlightEnabled == null;
|
||||
!(treesitter.enable && highlightEnabled);
|
||||
|
||||
message = ''
|
||||
You have enabled otter, but treesitter syntax highlighting is not enabled.
|
||||
Otter functionality might not work as expected without it. Make sure `plugins.treesitter.highlight.enable` and `plugins.treesitter.enable` are enabled.
|
||||
'';
|
||||
message =
|
||||
let
|
||||
inherit (options.plugins) treesitter;
|
||||
in
|
||||
''
|
||||
You have enabled otter, but treesitter syntax highlighting is not enabled.
|
||||
Otter functionality might not work as expected without it. Make sure `${treesitter.highlight.enable}` and `${treesitter.enable}` are enabled.
|
||||
'';
|
||||
};
|
||||
|
||||
lsp.onAttach = lib.mkIf cfg.autoActivate ''
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
if builtins.isString p then
|
||||
p
|
||||
else
|
||||
builtins.removeAttrs p [
|
||||
removeAttrs p [
|
||||
"path"
|
||||
"requires"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
}:
|
||||
let
|
||||
opts = options.plugins.rainbow-delimiters;
|
||||
inherit (builtins) any isNull;
|
||||
inherit (lib) mapAttrs' nameValuePair isString;
|
||||
inherit (lib.nixvim) mkRaw toLuaObject nestedLiteralLua;
|
||||
in
|
||||
|
|
@ -103,7 +102,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
];
|
||||
|
||||
assertions = lib.nixvim.mkAssertions "plugins.rainbow-delimiters" {
|
||||
assertion = any isNull [
|
||||
assertion = builtins.any isNull [
|
||||
(cfg.settings.whitelist or null)
|
||||
(cfg.settings.blacklist or null)
|
||||
];
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
package = "smart-splits-nvim";
|
||||
description = "Smarter and more intuitive split pane management that uses a mental model of left/right/up/down instead of wider/narrower/taller/shorter for resizing splits.";
|
||||
|
||||
maintainers = [ lib.maintainers.foo-dogsquared ];
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
settingsExample = {
|
||||
resize_mode = {
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
renamedSettings = lib.foldl' (
|
||||
acc: optPath:
|
||||
let
|
||||
snakeCasePath = builtins.map lib.nixvim.toSnakeCase optPath;
|
||||
snakeCasePath = map lib.nixvim.toSnakeCase optPath;
|
||||
optValue = lib.getAttrFromPath optPath cfg.settings;
|
||||
in
|
||||
lib.recursiveUpdate acc (lib.setAttrByPath snakeCasePath optValue)
|
||||
|
|
|
|||
29
plugins/by-name/vscode-diff/default.nix
Normal file
29
plugins/by-name/vscode-diff/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "vscode-diff";
|
||||
package = "vscode-diff-nvim";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
settingsExample = {
|
||||
highlights = {
|
||||
line_insert = "#2a3325";
|
||||
line_delete = "#362c2e";
|
||||
char_insert = "#3d4f35";
|
||||
char_delete = "#4d3538";
|
||||
};
|
||||
keymaps = {
|
||||
view = {
|
||||
next_hunk = "]c";
|
||||
prev_hunk = "[c";
|
||||
next_file = "]f";
|
||||
prev_file = "[f";
|
||||
};
|
||||
explorer = {
|
||||
select = "<CR>";
|
||||
hover = "K";
|
||||
refresh = "R";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
...
|
||||
}@args:
|
||||
lib.nixvim.plugins.mkVimPlugin (
|
||||
builtins.removeAttrs args [
|
||||
removeAttrs args [
|
||||
"pluginName"
|
||||
"sourceName"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ let
|
|||
mkCmpSourcePlugin = import ./_mk-cmp-plugin.nix {
|
||||
inherit lib pkgs;
|
||||
};
|
||||
pluginModules = builtins.map mkCmpSourcePlugin sources;
|
||||
pluginModules = map mkCmpSourcePlugin sources;
|
||||
in
|
||||
{
|
||||
# For extra cmp plugins
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ in
|
|||
acc: scope: renamed':
|
||||
acc ++ lib.mapAttrsToList (old: new: lib.mkRenamedOptionModule [ scope old ] [ scope new ]) renamed'
|
||||
) [ ] renamed
|
||||
++ builtins.map (
|
||||
++ map (
|
||||
name:
|
||||
lib.mkRemovedOptionModule [ "plugins" name "iconsPackage" ] ''
|
||||
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons`, or `plugins.mini-icons` with `plugins.mini-icons.mockDevIcons` instead.
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
actionStr = action.action or action;
|
||||
mode = action.mode or "n";
|
||||
actionProps = lib.optionalAttrs (builtins.isAttrs action) (
|
||||
builtins.removeAttrs action [
|
||||
removeAttrs action [
|
||||
"action"
|
||||
"mode"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
in
|
||||
[ (mkEntryFromDrv plugin) ] ++ processDependencies;
|
||||
|
||||
processedPlugins = builtins.concatLists (builtins.map processPlugin cfg.plugins);
|
||||
processedPlugins = builtins.concatLists (map processPlugin cfg.plugins);
|
||||
lazyPath = pkgs.linkFarm "lazy-plugins" processedPlugins;
|
||||
|
||||
pluginToLua =
|
||||
|
|
|
|||
|
|
@ -13,15 +13,15 @@ let
|
|||
};
|
||||
|
||||
disabledPackages = [
|
||||
# 2025-12-24: phpPackages.php-codesniffer is broken
|
||||
# https://github.com/NixOS/nixpkgs/pull/459254#issuecomment-3689578764
|
||||
"php-codesniffer"
|
||||
|
||||
# 2025-11-15 dependency swift is broken
|
||||
# https://github.com/NixOS/nixpkgs/issues/461474
|
||||
"sourcekit-lsp"
|
||||
"swift-format"
|
||||
|
||||
# 2025-12-20 build failure
|
||||
# https://github.com/NixOS/nixpkgs/issues/472704
|
||||
"terragrunt"
|
||||
|
||||
# 2025-10-12 dependency mbedtls is marked as insecure
|
||||
"haxe"
|
||||
]
|
||||
|
|
@ -105,6 +105,11 @@ let
|
|||
"wl-clipboard" # wayland
|
||||
]
|
||||
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isx86_64) [
|
||||
# 2025-12-24: build failure
|
||||
# I (@GaetanLepage) am able to build this package on my system, but it is not cached on
|
||||
# hydra.nixos.org and builbot fails at building it
|
||||
"trivy"
|
||||
|
||||
# 2025-11-16 dependency libsigsegv is broken
|
||||
"texlive"
|
||||
"texlive-combined-medium"
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ let
|
|||
# Recurse into all directories, extracting files as we find them.
|
||||
# This returns a list of { name; file; cases; } attrsets.
|
||||
fetchTests =
|
||||
path: namespace:
|
||||
testPath: namespace:
|
||||
let
|
||||
# Handle an entry from readDir
|
||||
# - If it is a regular nix file, import its content
|
||||
|
|
@ -35,7 +35,7 @@ let
|
|||
handleEntry =
|
||||
name: type:
|
||||
let
|
||||
file = /${path}/${name};
|
||||
file = /${testPath}/${name};
|
||||
in
|
||||
if type == "regular" then
|
||||
lib.optional (lib.hasSuffix ".nix" name) (
|
||||
|
|
@ -46,7 +46,7 @@ let
|
|||
else
|
||||
fetchTests file (namespace ++ [ name ]);
|
||||
in
|
||||
lib.pipe path [
|
||||
lib.pipe testPath [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (n: v: v != "symlink"))
|
||||
(lib.mapAttrsToList handleEntry)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ let
|
|||
let
|
||||
missingFromPkgs = builtins.concatMap (
|
||||
loc: lib.optional (!lib.hasAttrByPath loc pkgs) (lib.concatStringsSep "." loc)
|
||||
) (builtins.map lib.toList packages);
|
||||
) (map lib.toList packages);
|
||||
undeclared = lib.filter (name: !(lib.elem name declared)) generated;
|
||||
uselesslyDeclared = lib.partition (name: lib.elem name unsupported) (
|
||||
lib.filter (name: !(lib.elem name generated)) declared
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ else
|
|||
runCommandLocal "lib-tests-failure"
|
||||
{
|
||||
results = lib.concatStringsSep "\n" (
|
||||
builtins.map (result: ''
|
||||
map (result: ''
|
||||
${result.name}:
|
||||
expected: ${lib.generators.toPretty { } result.expected}
|
||||
result: ${lib.generators.toPretty { } result.result}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ let
|
|||
configuration.config.build.test.overrideAttrs (old: {
|
||||
passthru =
|
||||
old.passthru or { }
|
||||
// builtins.removeAttrs configuration [
|
||||
// removeAttrs configuration [
|
||||
"_type"
|
||||
"type"
|
||||
]
|
||||
|
|
@ -66,7 +66,7 @@ let
|
|||
config = import ../example.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
main = builtins.removeAttrs config.programs.nixvim [
|
||||
main = removeAttrs config.programs.nixvim [
|
||||
# This is not available to standalone modules, only HM & NixOS Modules
|
||||
"enable"
|
||||
# This is purely an example, it does not reflect a real usage
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
nixpkgsLib,
|
||||
runCommandLocal,
|
||||
}:
|
||||
let
|
||||
inherit (lib) attrNames filter length;
|
||||
nixvimList = import ../lib/maintainers.nix;
|
||||
nixpkgsList = nixpkgsLib.maintainers;
|
||||
duplicates = filter (name: nixpkgsList ? ${name}) (attrNames nixvimList);
|
||||
count = length duplicates;
|
||||
duplicates = builtins.filter (name: nixpkgsList ? ${name}) (builtins.attrNames nixvimList);
|
||||
count = builtins.length duplicates;
|
||||
in
|
||||
runCommandLocal "maintainers-test" { inherit count duplicates; } ''
|
||||
if [ $count -gt 0 ]; then
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
empty = {
|
||||
plugins = {
|
||||
blink-cmp.enable = true;
|
||||
blink-cmp-avante.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins = {
|
||||
blink-cmp-avante.enable = true;
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
sources = {
|
||||
default = [
|
||||
"avante"
|
||||
"lsp"
|
||||
"path"
|
||||
"buffer"
|
||||
];
|
||||
providers = {
|
||||
avante = {
|
||||
module = "blink-cmp-avante";
|
||||
name = "Avante";
|
||||
opts = { };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
48
tests/test-sources/plugins/by-name/codesettings/default.nix
Normal file
48
tests/test-sources/plugins/by-name/codesettings/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.codesettings.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.codesettings = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
config_file_paths = [
|
||||
".vscode/settings.json"
|
||||
"codesettings.json"
|
||||
"lspsettings.json"
|
||||
];
|
||||
jsonc_filetype = true;
|
||||
jsonls_integration = true;
|
||||
live_reload = false;
|
||||
loader_extensions = [ ];
|
||||
lua_ls_integration = true;
|
||||
merge_lists = "append";
|
||||
root_dir.__raw = "nil";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.codesettings = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
config_file_paths = [
|
||||
".vscode/settings.json"
|
||||
"codesettings.json"
|
||||
"lspsettings.json"
|
||||
".codesettings.json"
|
||||
".lspsettings.json"
|
||||
".nvim/codesettings.json"
|
||||
".nvim/lspsettings.json"
|
||||
];
|
||||
jsonls_integration = true;
|
||||
default_merge_opts = {
|
||||
list_behavior = "prepend";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
# toolOptions is an attrsets of the form:
|
||||
# { <lang> = { linter = tools; formatter = tools; }; }
|
||||
# Where tools is the option type representing the valid tools for this language
|
||||
toolOptions = builtins.removeAttrs (languages.type.getSubOptions languages.loc) [
|
||||
toolOptions = removeAttrs (languages.type.getSubOptions languages.loc) [
|
||||
"_freeformOptions"
|
||||
"_module"
|
||||
|
||||
|
|
@ -21,7 +21,12 @@
|
|||
"JSON"
|
||||
];
|
||||
|
||||
brokenTools = [ ];
|
||||
brokenTools = [
|
||||
# 2025-12-24: phpPackages.php-codesniffer is broken
|
||||
# https://github.com/NixOS/nixpkgs/pull/459254#issuecomment-3689578764
|
||||
"phpcbf"
|
||||
"phpcs"
|
||||
];
|
||||
|
||||
# TODO: respect unpackaged from generated
|
||||
unpackaged = [
|
||||
|
|
|
|||
33
tests/test-sources/plugins/by-name/iswap/default.nix
Normal file
33
tests/test-sources/plugins/by-name/iswap/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.iswap.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.iswap = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
keys = "asdfghjklqwertyuiopzxcvbnm";
|
||||
hl_grey = "Comment";
|
||||
hl_snipe = "Search";
|
||||
hl_selection = "Visual";
|
||||
flash_style = "sequential";
|
||||
hl_flash = "IncSearch";
|
||||
hl_grey_priority = 1000;
|
||||
grey = "enable";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.iswap = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
debug = true;
|
||||
move_cursor = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.lsp-format-modifications.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -100,10 +100,10 @@
|
|||
sources =
|
||||
let
|
||||
disabled = [
|
||||
# TODO Added 2025-12-20 build failure
|
||||
# https://github.com/NixOS/nixpkgs/issues/472704
|
||||
"terragrunt_fmt"
|
||||
"terragrunt_validate"
|
||||
# TODO Added 2025-12-24: phpPackages.php-codesniffer is broken
|
||||
# https://github.com/NixOS/nixpkgs/pull/459254#issuecomment-3689578764
|
||||
"phpcbf"
|
||||
"phpcs"
|
||||
|
||||
# TODO Added 2025-11-15
|
||||
# dependency swift is broken
|
||||
|
|
|
|||
|
|
@ -61,4 +61,30 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
warning-no-highlight = {
|
||||
test.runNvim = false;
|
||||
test.warnings = expect: [
|
||||
(expect "count" 1)
|
||||
(expect "any" "You have enabled otter, but treesitter syntax highlighting is not enabled.")
|
||||
(expect "any" "Make sure `plugins.treesitter.highlight.enable` and `plugins.treesitter.enable` are enabled.")
|
||||
];
|
||||
plugins = {
|
||||
otter.enable = true;
|
||||
treesitter.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
warning-no-treesitter = {
|
||||
test.runNvim = false;
|
||||
test.warnings = expect: [
|
||||
(expect "count" 1)
|
||||
(expect "any" "You have enabled otter, but treesitter syntax highlighting is not enabled.")
|
||||
(expect "any" "Make sure `plugins.treesitter.highlight.enable` and `plugins.treesitter.enable` are enabled.")
|
||||
];
|
||||
plugins = {
|
||||
otter.enable = true;
|
||||
treesitter.highlight.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
85
tests/test-sources/plugins/by-name/vscode-diff/default.nix
Normal file
85
tests/test-sources/plugins/by-name/vscode-diff/default.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.vscode-diff.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.vscode-diff = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
highlights = {
|
||||
line_insert = "#2a3325";
|
||||
line_delete = "#362c2e";
|
||||
char_insert = "#3d4f35";
|
||||
char_delete = "#4d3538";
|
||||
};
|
||||
keymaps = {
|
||||
view = {
|
||||
next_hunk = "]c";
|
||||
prev_hunk = "[c";
|
||||
next_file = "]f";
|
||||
prev_file = "[f";
|
||||
};
|
||||
explorer = {
|
||||
select = "<CR>";
|
||||
hover = "K";
|
||||
refresh = "R";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.vscode-diff = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
highlights = {
|
||||
line_insert = "DiffAdd";
|
||||
line_delete = "DiffDelete";
|
||||
char_insert.__raw = "nil";
|
||||
char_delete.__raw = "nil";
|
||||
char_brightness.__raw = "nil";
|
||||
};
|
||||
diff = {
|
||||
disable_inlay_hints = true;
|
||||
max_computation_time_ms = 5000;
|
||||
};
|
||||
explorer = {
|
||||
position = "left";
|
||||
width = 40;
|
||||
height = 15;
|
||||
view_mode = "list";
|
||||
indent_markers = true;
|
||||
icons = {
|
||||
folder_closed = "\u{e5ff}";
|
||||
folder_open = "\u{e5fe}";
|
||||
};
|
||||
file_filter = {
|
||||
ignore = [ ];
|
||||
};
|
||||
};
|
||||
keymaps = {
|
||||
view = {
|
||||
quit = "q";
|
||||
toggle_explorer = "<leader>b";
|
||||
next_hunk = "]c";
|
||||
prev_hunk = "[c";
|
||||
next_file = "]f";
|
||||
prev_file = "[f";
|
||||
diff_get = "do";
|
||||
diff_put = "dp";
|
||||
};
|
||||
explorer = {
|
||||
select = "<CR>";
|
||||
hover = "K";
|
||||
refresh = "R";
|
||||
toggle_view_mode = "i";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# DO NOT MODIFY!
|
||||
# This file was generated by ci/version-info/default.nix
|
||||
nixpkgs_rev = "7d853e518814cca2a657b72eeba67ae20ebf7059"
|
||||
nixpkgs_rev = "346dd96ad74dc4457a9db9de4f4f57dab2e5731d"
|
||||
release = "26.05"
|
||||
unstable = true
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
listToAttrs
|
||||
map
|
||||
mkIf
|
||||
mkMerge
|
||||
optionalAttrs
|
||||
|
|
@ -89,7 +87,7 @@ in
|
|||
(optionalAttrs (filesOpt != null) (
|
||||
mkIf (cfg.enable && !cfg.wrapRc) (
|
||||
setAttrByPath filesOpt (
|
||||
listToAttrs (
|
||||
builtins.listToAttrs (
|
||||
map (
|
||||
{ target, finalSource, ... }:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue