Compare commits
32 commits
main
...
nixos-25.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3568897008 | ||
|
|
204a2f3d35 | ||
|
|
685d0be1fc | ||
|
|
ce144adecb | ||
|
|
d8c9d8451d | ||
|
|
2d088ea80a | ||
|
|
f0b0cc7cae | ||
|
|
844cb1c1b7 | ||
|
|
a9d0e063bc | ||
|
|
cb9357fe10 | ||
|
|
64d9e2616f | ||
|
|
48e4df646d | ||
|
|
6bdabc1359 | ||
|
|
28058b3e09 | ||
|
|
e36a7fd479 | ||
|
|
967ba0bbe1 | ||
|
|
79b887f068 | ||
|
|
8300ad59dd | ||
|
|
30cc2dddc9 | ||
|
|
a4a84e5252 | ||
|
|
684cad64bf | ||
|
|
b09935ccf1 | ||
|
|
5d3e47d2c5 | ||
|
|
ae5d510151 | ||
|
|
5836ccd335 | ||
|
|
cd938720c6 | ||
|
|
c2cc8b5a18 | ||
|
|
fb9bb5d548 | ||
|
|
04f4f0af48 | ||
|
|
17d3a903ac | ||
|
|
eeb1e454f8 | ||
|
|
9b938eb50e |
36 changed files with 461 additions and 259 deletions
|
|
@ -13,9 +13,9 @@ Deprecations should include a comment in the format of:
|
|||
|
||||
where:
|
||||
|
||||
- `n` is the current release; 25.05 at the time of writing
|
||||
- `n+1` is the next release; 25.11 at the time of writing
|
||||
- `n+2` is the release following `n+1`; 26.05 at the time of writing
|
||||
- `n` is the current release; 25.11 at the time of writing
|
||||
- `n+1` is the next release; 26.05 at the time of writing
|
||||
- `n+2` is the release following `n+1`; 26.11 at the time of writing
|
||||
|
||||
If a warning is created on release `n`, then:
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ If you have any question, please use the [discussions page](https://github.com/n
|
|||
> Nixvim needs to be installed with a compatible nixpkgs version.
|
||||
> This means that the `main` branch of Nixvim requires to be installed with `nixpkgs-unstable`.
|
||||
>
|
||||
> If you want to use Nixvim with nixpkgs 25.05 you should use the `nixos-25.05` branch.
|
||||
> If you want to use Nixvim with nixpkgs 25.11 you should use the `nixos-25.11` branch.
|
||||
|
||||
For more detail, see the [Installation](https://nix-community.github.io/nixvim) section of our documentation.
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ let
|
|||
nixvim = import (builtins.fetchGit {
|
||||
url = "https://github.com/nix-community/nixvim";
|
||||
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of Nixvim.
|
||||
# ref = "nixos-25.05";
|
||||
# ref = "nixos-25.11";
|
||||
});
|
||||
in
|
||||
{
|
||||
|
|
@ -151,7 +151,7 @@ flakes, just add the `nixvim` input:
|
|||
inputs.nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
# If you are not running an unstable channel of nixpkgs, select the corresponding branch of Nixvim.
|
||||
# url = "github:nix-community/nixvim/nixos-25.05";
|
||||
# url = "github:nix-community/nixvim/nixos-25.11";
|
||||
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
|
@ -286,7 +286,7 @@ in pkgs.mkShell {
|
|||
Documentation is available on this project's GitHub Pages page:
|
||||
[https://nix-community.github.io/nixvim](https://nix-community.github.io/nixvim)
|
||||
|
||||
The stable documentation is also available at [https://nix-community.github.io/nixvim/25.05](https://nix-community.github.io/nixvim/25.05).
|
||||
The stable documentation is also available at [https://nix-community.github.io/nixvim/25.11](https://nix-community.github.io/nixvim/25.11).
|
||||
|
||||
If the option `enableMan` is set to `true` (by default it is), man pages will also
|
||||
be installed containing the same information, they can be viewed with `man nixvim`.
|
||||
|
|
|
|||
130
ci/update.nix
130
ci/update.nix
|
|
@ -26,84 +26,114 @@ writeShellApplication {
|
|||
shift
|
||||
done
|
||||
|
||||
update_args=( )
|
||||
if [ -n "$commit" ]; then
|
||||
update_args+=( "--commit-lock-file" )
|
||||
fi
|
||||
# Ensure we run at the root of the flake
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
|
||||
currentCommit() {
|
||||
git show --no-patch --format=%h
|
||||
}
|
||||
workdir=$(mktemp -d -t update-XXXXXX)
|
||||
trap 'rm -rf "$workdir"' EXIT
|
||||
root_update="$workdir/root_update"
|
||||
dev_update="$workdir/dev_update"
|
||||
root_msg="$workdir/root_msg"
|
||||
dev_msg="$workdir/dev_msg"
|
||||
commit_msg="$workdir/commit_msg"
|
||||
|
||||
hasChanges() {
|
||||
old="$1"
|
||||
new="$2"
|
||||
if [ -n "$commit" ]; then
|
||||
[ "$old" != "$new" ]
|
||||
elif git diff --quiet; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
cleanUpdateOutput() {
|
||||
awk --assign prefix="$PWD/" '
|
||||
# Find the start of the update info block
|
||||
/^warning: updating lock file "/ {
|
||||
if (match($0, /"([^"]+)"/, m)) {
|
||||
# Print the first line as `{path} updates:`
|
||||
path = m[1]
|
||||
sub("^" prefix, "", path)
|
||||
print path " updates:"
|
||||
|
||||
# Mark that we have entered the update info block
|
||||
printing=1
|
||||
}
|
||||
next
|
||||
}
|
||||
|
||||
# Print while in the update info block
|
||||
printing {
|
||||
if ($0 == "") exit
|
||||
print
|
||||
}
|
||||
' "$1"
|
||||
}
|
||||
|
||||
writeGitHubOutput() {
|
||||
if [ -n "$use_github_output" ] && [ -n "$commit" ]; then
|
||||
if [ -n "$use_github_output" ]; then
|
||||
{
|
||||
echo "$1<<EOF"
|
||||
git show --no-patch --format=%b
|
||||
cat "$2"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
}
|
||||
|
||||
versionInfo() {
|
||||
extra_args=( )
|
||||
if [ "$1" = "--amend" ]; then
|
||||
extra_args+=(
|
||||
"--amend"
|
||||
"--no-edit"
|
||||
)
|
||||
fi
|
||||
|
||||
nix-build ./ci -A version-info
|
||||
./result/bin/version-info
|
||||
|
||||
if [ -n "$commit" ]; then
|
||||
git add version-info.toml
|
||||
git commit "''${extra_args[@]}"
|
||||
fi
|
||||
echo "Updating version-info"
|
||||
"$(nix-build ./ci -A version-info --no-out-link)"/bin/version-info
|
||||
}
|
||||
|
||||
# Initialise version-info.toml
|
||||
if [ ! -f version-info.toml ]; then
|
||||
echo "Creating version-info file"
|
||||
versionInfo -m "version-info: init"
|
||||
versionInfo
|
||||
if [ -n "$commit" ]; then
|
||||
git add version-info.toml
|
||||
git commit -m "version-info: init"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Commit message summary
|
||||
{
|
||||
# Avoid using impure global config from `nix config show commit-lock-file-summary`
|
||||
nix-instantiate --raw --eval flake.nix --attr nixConfig.commit-lock-file-summary 2>/dev/null \
|
||||
|| echo -n "flake: Update"
|
||||
printf '\n'
|
||||
} >"$commit_msg"
|
||||
|
||||
# Update the root lockfile
|
||||
old=$(currentCommit)
|
||||
echo "Updating root lockfile"
|
||||
nix flake update "''${update_args[@]}"
|
||||
new=$(currentCommit)
|
||||
if hasChanges "$old" "$new"; then
|
||||
echo "Updating version-info"
|
||||
versionInfo --amend
|
||||
writeGitHubOutput root_lock_body
|
||||
nix flake update 2> >(tee "$root_update" >&2)
|
||||
cleanUpdateOutput "$root_update" > "$root_msg"
|
||||
if [ -s "$root_msg" ]; then
|
||||
{
|
||||
printf '\n'
|
||||
cat "$root_msg"
|
||||
} >>"$commit_msg"
|
||||
versionInfo
|
||||
writeGitHubOutput root_lock_body "$root_msg"
|
||||
fi
|
||||
|
||||
# Update the dev lockfile
|
||||
root_nixpkgs=$(nix eval --raw --file . 'inputs.nixpkgs.rev')
|
||||
old=$(currentCommit)
|
||||
echo "Updating dev lockfile"
|
||||
nix flake update "''${update_args[@]}" \
|
||||
nix flake update \
|
||||
--override-input 'dev-nixpkgs' "github:NixOS/nixpkgs/$root_nixpkgs" \
|
||||
--flake './flake/dev'
|
||||
new=$(currentCommit)
|
||||
if hasChanges "$old" "$new"; then
|
||||
echo "Updating version-info"
|
||||
versionInfo --amend
|
||||
writeGitHubOutput dev_lock_body
|
||||
--flake './flake/dev' \
|
||||
2> >(tee "$dev_update" >&2)
|
||||
cleanUpdateOutput "$dev_update" > "$dev_msg"
|
||||
if [ -s "$dev_msg" ]; then
|
||||
{
|
||||
printf '\n'
|
||||
cat "$dev_msg"
|
||||
} >>"$commit_msg"
|
||||
versionInfo
|
||||
writeGitHubOutput dev_lock_body "$dev_msg"
|
||||
fi
|
||||
|
||||
# Only commit if at least one file has changes
|
||||
if git diff --quiet flake.lock flake/dev/flake.lock version-info.toml; then
|
||||
echo "Nothing to commit"
|
||||
elif [ -n "$commit" ]; then
|
||||
echo "Committing"
|
||||
git add flake.lock flake/dev/flake.lock version-info.toml
|
||||
git commit --file "$commit_msg"
|
||||
else
|
||||
echo "Would commit as (skipping):"
|
||||
cat "$commit_msg"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
name = "github-theme";
|
||||
package = "github-nvim-theme";
|
||||
isColorscheme = true;
|
||||
colorscheme = "github_dark";
|
||||
|
||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||
|
||||
|
|
|
|||
|
|
@ -48,35 +48,39 @@ let
|
|||
removeWhitespace = builtins.replaceStrings [ " " ] [ "" ];
|
||||
|
||||
getSubOptions =
|
||||
opts: path:
|
||||
lib.optionalAttrs (isDeeplyVisible opts) (removeUnwanted (opts.type.getSubOptions path));
|
||||
opt:
|
||||
let
|
||||
visible = opt.visible or true;
|
||||
visible' = if lib.isBool visible then visible else visible != "shallow";
|
||||
subOpts = opt.type.getSubOptions opt.loc;
|
||||
in
|
||||
lib.optionalAttrs visible' (removeUnwanted subOpts);
|
||||
|
||||
isVisible = isVisibleWith true;
|
||||
isDeeplyVisible = isVisibleWith false;
|
||||
|
||||
isVisibleWith =
|
||||
shallow: opts:
|
||||
isVisible =
|
||||
let
|
||||
test =
|
||||
opt:
|
||||
let
|
||||
internal = opt.internal or false;
|
||||
visible = opt.visible or true;
|
||||
visible' = if visible == "shallow" then shallow else visible;
|
||||
visible' = if lib.isBool visible then visible else visible != "transparent";
|
||||
in
|
||||
visible' && !internal;
|
||||
|
||||
# FIXME: isVisible is not a perfect check;
|
||||
# it will false-positive on `visible = "transparent"`
|
||||
hasVisible = opts: lib.any (v: lib.isAttrs v -> isVisible v) (lib.attrValues opts);
|
||||
in
|
||||
opts:
|
||||
if lib.isOption opts then
|
||||
test opts
|
||||
else if opts.isOption then
|
||||
test opts.index.options
|
||||
else
|
||||
let
|
||||
filterFunc = lib.filterAttrs (_: v: if lib.isAttrs v then isVisibleWith shallow v else true);
|
||||
hasEmptyIndex = (filterFunc opts.index.options) == { };
|
||||
hasEmptyComponents = (filterFunc opts.components) == { };
|
||||
in
|
||||
!hasEmptyIndex || !hasEmptyComponents;
|
||||
lib.any hasVisible [
|
||||
opts.index.options
|
||||
opts.components
|
||||
];
|
||||
|
||||
wrapOptionDocPage = path: opts: isOpt: rec {
|
||||
index = {
|
||||
|
|
@ -136,7 +140,7 @@ let
|
|||
wrapOptionDocPage (path ++ [ name ]) (go (path ++ [ name ]) opts) false
|
||||
else
|
||||
let
|
||||
subOpts = getSubOptions opts (path ++ [ name ]);
|
||||
subOpts = getSubOptions opts;
|
||||
in
|
||||
# If this node is an option with sub-options...
|
||||
# Pass wrapOptionDocPage a set containing it and its sub-options.
|
||||
|
|
@ -144,7 +148,7 @@ let
|
|||
if subOpts != { } then
|
||||
wrapOptionDocPage (path ++ [ name ]) (
|
||||
(go (path ++ [ name ]) subOpts)
|
||||
// {
|
||||
// lib.optionalAttrs (isVisible opts) {
|
||||
# This is necessary to include the option itself in the docs.
|
||||
# For instance, this helps submodules like "autoCmd" to include their base declaration in the docs.
|
||||
# Though there must be a better, less "hacky" solution than this.
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ When using Nixvim, it is possible to encounter errors about something not being
|
|||
```
|
||||
|
||||
This usually means one of two things:
|
||||
- The nixpkgs version is not in line with NixVim (for example nixpkgs nixos-25.05 is used with NixVim master)
|
||||
- The nixpkgs version is not in line with NixVim (for example nixpkgs nixos-25.11 is used with NixVim master)
|
||||
- The nixpkgs unstable version used with NixVim is not recent enough.
|
||||
|
||||
When building nixvim using flakes and our ["standalone mode"][standalone], we usually recommend _not_ declaring a "follows" for `inputs.nixvim`.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ You must use a `nixpkgs` version compatible with the nixvim version you choose.
|
|||
The `main` branch requires to use a _very recent_ version of nixpkgs unstable.
|
||||
In order to guarantee the compatibility between nixvim & nixpkgs it is recommended to always update both at the same time.
|
||||
|
||||
When using a `stable` version you must use the corresponding nixvim branch, for example `nixos-25.05` when using NixOS 25.05.
|
||||
When using a `stable` version you must use the corresponding nixvim branch, for example `nixos-25.11` when using NixOS 25.11.
|
||||
|
||||
Failure to use the correct branch, or an old revision of nixpkgs will likely result in errors of the form `vimPlugins.<name> attribute not found`.
|
||||
|
||||
|
|
|
|||
14
flake.lock
generated
14
flake.lock
generated
|
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763759067,
|
||||
"narHash": "sha256-LlLt2Jo/gMNYAwOgdRQBrsRoOz7BPRkzvNaI/fzXi2Q=",
|
||||
"lastModified": 1765835352,
|
||||
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "2cccadc7357c0ba201788ae99c4dfa90728ef5e0",
|
||||
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -66,16 +66,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1763618868,
|
||||
"narHash": "sha256-v5afmLjn/uyD9EQuPBn7nZuaZVV9r+JerayK/4wvdWA=",
|
||||
"lastModified": 1765838191,
|
||||
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a8d610af3f1a5fb71e23e08434d8d61a466fc942",
|
||||
"rev": "c6f52ebd45e5925c188d1a20119978aa4ffd5ef6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
description = "A neovim configuration system for NixOS";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
|
||||
systems.url = "github:nix-systems/default";
|
||||
|
||||
|
|
@ -18,6 +18,7 @@
|
|||
};
|
||||
|
||||
nixConfig = {
|
||||
commit-lock-file-summary = "flake: Update";
|
||||
extra-substituters = [ "https://nix-community.cachix.org" ];
|
||||
extra-trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
|
|
|
|||
46
flake/dev/flake.lock
generated
46
flake/dev/flake.lock
generated
|
|
@ -2,16 +2,16 @@
|
|||
"nodes": {
|
||||
"dev-nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1763618868,
|
||||
"narHash": "sha256-v5afmLjn/uyD9EQuPBn7nZuaZVV9r+JerayK/4wvdWA=",
|
||||
"lastModified": 1765838191,
|
||||
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a8d610af3f1a5fb71e23e08434d8d61a466fc942",
|
||||
"rev": "c6f52ebd45e5925c188d1a20119978aa4ffd5ef6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"ref": "nixos-25.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -23,11 +23,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762521437,
|
||||
"narHash": "sha256-RXN+lcx4DEn3ZS+LqEJSUu/HH+dwGvy0syN7hTo/Chg=",
|
||||
"lastModified": 1764011051,
|
||||
"narHash": "sha256-M7SZyPZiqZUR/EiiBJnmyUbOi5oE/03tCeFrTiUZchI=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "07bacc9531f5f4df6657c0a02a806443685f384a",
|
||||
"rev": "17ed8d9744ebe70424659b0ef74ad6d41fc87071",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -38,11 +38,11 @@
|
|||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1761588617,
|
||||
"narHash": "sha256-bHDJDoMHMMctf90Ug0po2LNanPgdB8aRl0psH7+TWzc=",
|
||||
"lastModified": 1765186200,
|
||||
"narHash": "sha256-QN1r/zNqvXHwWqlRAnRtFf4CQwIOJx58PtdExIzAw94=",
|
||||
"owner": "NixOS",
|
||||
"repo": "flake-compat",
|
||||
"rev": "01ad7ce89c455171e4f864799b21d0785ba94a3a",
|
||||
"rev": "63d095ca43128741b16fc354b1e918757e6b66e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -63,11 +63,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763741496,
|
||||
"narHash": "sha256-uIRqs/H18YEtMOn1OkbnPH+aNTwXKx+iU3qnxEkVUd0=",
|
||||
"lastModified": 1765911976,
|
||||
"narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "20e71a403c5de9ce5bd799031440da9728c1cda1",
|
||||
"rev": "b68b780b69702a090c8bb1b973bab13756cc7a27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -104,15 +104,16 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763748372,
|
||||
"narHash": "sha256-AUc78Qv3sWir0hvbmfXoZ7Jzq9VVL97l+sP9Jgms+JU=",
|
||||
"lastModified": 1765979862,
|
||||
"narHash": "sha256-/r9/1KamvbHJx6I40H4HsSXnEcBAkj46ZwibhBx9kg0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d10a9b16b2a3ee28433f3d1c603f4e9f1fecb8e1",
|
||||
"rev": "d3135ab747fd9dac250ffb90b4a7e80634eacbe9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -124,15 +125,16 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763505477,
|
||||
"narHash": "sha256-nJRd4LY2kT3OELfHqdgWjvToNZ4w+zKCMzS2R6z4sXE=",
|
||||
"lastModified": 1765066094,
|
||||
"narHash": "sha256-0YSU35gfRFJzx/lTGgOt6ubP8K6LeW0vaywzNNqxkl4=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "3bda9f6b14161becbd07b3c56411f1670e19b9b5",
|
||||
"rev": "688427b1aab9afb478ca07989dc754fa543e03d5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "nix-darwin-25.11",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
|
|
@ -155,11 +157,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762938485,
|
||||
"narHash": "sha256-AlEObg0syDl+Spi4LsZIBrjw+snSVU4T8MOeuZJUJjM=",
|
||||
"lastModified": 1766000401,
|
||||
"narHash": "sha256-+cqN4PJz9y0JQXfAK5J1drd0U05D5fcAGhzhfVrDlsI=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "5b4ee75aeefd1e2d5a1cc43cf6ba65eba75e83e4",
|
||||
"rev": "42d96e75aa56a3f70cab7e7dc4a32868db28e8fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
# NOTE: Use a different name to the root flake's inputs.nixpkgs to avoid shadowing it.
|
||||
# NOTE: The only reason we specify a nixpkgs input at all here, is so the other inputs can follow it.
|
||||
# TODO: Once nix 2.26 is more prevalent, follow the root flake's inputs using a "path:../.." input.
|
||||
dev-nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
dev-nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||
|
||||
# flake-compat is used by the root `default.nix` to allow non-flake users to import nixvim
|
||||
#
|
||||
|
|
@ -25,12 +25,12 @@
|
|||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
url = "github:nix-community/home-manager/release-25.11";
|
||||
inputs.nixpkgs.follows = "dev-nixpkgs";
|
||||
};
|
||||
|
||||
nix-darwin = {
|
||||
url = "github:lnl7/nix-darwin";
|
||||
url = "github:lnl7/nix-darwin/nix-darwin-25.11";
|
||||
inputs.nixpkgs.follows = "dev-nixpkgs";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -214,6 +214,7 @@
|
|||
"swiftlint",
|
||||
"syntax_tree",
|
||||
"taplo",
|
||||
"tclfmt",
|
||||
"templ",
|
||||
"terraform_fmt",
|
||||
"terragrunt_hclfmt",
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@
|
|||
"ghdl_ls": "https://github.com/ghdl/ghdl-language-server A language server for VHDL,\nusing ghdl as its backend. `ghdl-ls` is part of pyghdl, for installation\ninstructions see [the upstream\nREADME](https://github.com/ghdl/ghdl/tree/master/pyGHDL/lsp).",
|
||||
"ginko_ls": "Language servers can be used in many editors, such as Visual Studio\nCode, Emacs or Vim Install `ginko_ls` from\nhttps://github.com/Schottkyc137/ginko and add it to path `ginko_ls`\ndoesn't require any configuration.",
|
||||
"gitlab_ci_ls": "https://github.com/alesbrelih/gitlab-ci-ls Language Server for Gitlab CI\n`gitlab-ci-ls` can be installed via cargo: cargo install gitlab-ci-ls",
|
||||
"gitlab_duo": "GitLab Duo Language Server Configuration for Neovim\nhttps://gitlab.com/gitlab-org/editor-extensions/gitlab-lsp The GitLab\nLSP enables any editor or IDE to integrate with GitLab Duo for\nAI-powered code suggestions via the Language Server Protocol.\nPrerequisites: - Node.js and npm installed - GitLab account with Duo Pro\nlicense - Internet connection for OAuth device flow Setup: 1. Run\n:LspGitLabDuoSignIn to start OAuth authentication 2. Follow the browser\nprompts to authorize 3. Enable inline completion in LspAttach event (see\nexample below) Inline Completion Example:\n\n``` lua\nvim.api.nvim_create_autocmd('LspAttach', {\n callback = function(args)\n local bufnr = args.buf\n local client = assert(vim.lsp.get_client_by_id(args.data.client_id))\n if vim.lsp.inline_completion and\n client:supports_method(vim.lsp.protocol.Methods.textDocument_inlineCompletion, bufnr) then\n vim.lsp.inline_completion.enable(true, { bufnr = bufnr })\n -- Tab to accept suggestion\n vim.keymap.set('i', '<Tab>', function()\n if vim.lsp.inline_completion.is_visible() then\n return vim.lsp.inline_completion.accept()\n else\n return '<Tab>'\n end\n end, { expr = true, buffer = bufnr, desc = 'GitLab Duo: Accept suggestion' })\n -- Alt/Option+[ for previous suggestion\n vim.keymap.set('i', '<M-[>', vim.lsp.inline_completion.select_prev,\n { buffer = bufnr, desc = 'GitLab Duo: Previous suggestion' })\n -- Alt/Option+] for next suggestion\n vim.keymap.set('i', '<M-]>', vim.lsp.inline_completion.select_next,\n { buffer = bufnr, desc = 'GitLab Duo: Next suggestion' })\n end\n end\n})\n```",
|
||||
"glasgow": "https://github.com/nolanderc/glasgow Provides language features for WGSL\n(WebGPU Shading Language): - Completions: - Local\nfunctions/variables/types. - Fields and swizzles. - Builtin types and\nfunctions (`dot`, `reflect`, `textureSample`, `vec3`, `mat4x2`, etc.) -\nHover Documentation: - Function signatures. - Variable types. - Includes\nbuiltin types and functions. Text is taken from the WGSL\nspecification. - Goto Definition - Find all References - Rename -\nFormatter `glasgow` can be installed via `cargo`:\n\n``` sh\ncargo install glasgow\n```",
|
||||
"gleam": "https://github.com/gleam-lang/gleam A language server for Gleam\nProgramming Language. It comes with the Gleam compiler, for installation\nsee: [Installing Gleam](https://gleam.run/getting-started/installing/)",
|
||||
"glint": "https://github.com/typed-ember/glint\nhttps://typed-ember.gitbook.io/glint/ `glint-language-server` is\ninstalled when adding `@glint/core` to your project's devDependencies:\n\\`\\``sh npm install @glint/core --save-dev yarn add -D @glint/core This configuration uses the local installation of`glint-language-server`(found in the`node_modules`directory of your project). To use a global installation of`glint-language-server`, set the`init_options.glint.useGlobal`to`true\\`.\nvim.lsp.config('glint', { init_options = { glint = { useGlobal = true,\n}, }, })",
|
||||
|
|
@ -162,7 +163,6 @@
|
|||
"kulala_ls": "https://github.com/mistweaverco/kulala-ls A minimal language server for\nHTTP syntax.",
|
||||
"laravel_ls": "https://github.com/laravel-ls/laravel-ls `laravel-ls`, language server\nfor laravel The default `cmd` assumes that the `laravel-ls` binary can\nbe found in `$PATH`.",
|
||||
"lean3ls": "https://github.com/leanprover/lean-client-js/tree/master/lean-language-server\nLean installation instructions can be found\n[here](https://leanprover-community.github.io/get_started.html#regular-install).\nOnce Lean is installed, you can install the Lean 3 language server by\nrunning\n\n``` sh\nnpm install -g lean-language-server\n```\n\nNote: that if you're using\n[lean.nvim](https://github.com/Julian/lean.nvim), that plugin fully\nhandles the setup of the Lean language server, and you shouldn't set up\n`lean3ls` both with it and `lspconfig`.",
|
||||
"leanls": "https://github.com/leanprover/lean4 Lean installation instructions can\nbe found\n[here](https://leanprover-community.github.io/get_started.html#regular-install).\nThe Lean language server is included in any Lean installation and does\nnot require any additional packages. Note: that if you're using\n[lean.nvim](https://github.com/Julian/lean.nvim), that plugin fully\nhandles the setup of the Lean language server, and you shouldn't set up\n`leanls` both with it and `lspconfig`.",
|
||||
"lelwel_ls": "https://github.com/0x2a-42/lelwel Language server for lelwel grammars.\nYou can install `lelwel-ls` via cargo:\n\n``` sh\ncargo install --features=\"lsp\" lelwel\n```",
|
||||
"lemminx": "https://github.com/eclipse/lemminx The easiest way to install the server\nis to get a binary from\nhttps://github.com/redhat-developer/vscode-xml/releases and place it on\nyour PATH. NOTE to macOS users: Binaries from unidentified developers\nare blocked by default. If you trust the downloaded binary, run it once,\ncancel the prompt, then remove the binary from Gatekeeper quarantine\nwith `xattr -d com.apple.quarantine lemminx`. It should now run without\nbeing blocked.",
|
||||
"lexical": "https://github.com/lexical-lsp/lexical Lexical is a next-generation\nlanguage server for the Elixir programming language. Follow the\n[Detailed Installation\nInstructions](https://github.com/lexical-lsp/lexical/blob/main/pages/installation.md)\n**By default, `lexical` doesn't have a `cmd` set.** This is because\nnvim-lspconfig does not make assumptions about your path.",
|
||||
|
|
@ -312,6 +312,7 @@
|
|||
"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```",
|
||||
"tblgen_lsp_server": "https://mlir.llvm.org/docs/Tools/MLIRLSP/#tablegen-lsp-language-server--tblgen-lsp-server\nThe Language Server for the LLVM TableGen language `tblgen-lsp-server`\ncan be installed at the llvm-project repository\n(https://github.com/llvm/llvm-project)",
|
||||
"tclsp": "https://github.com/nmoroze/tclint `tclsp`, a language server for Tcl\n`tclsp` can be installed via `pipx`:\n\n``` sh\npipx install tclint\n```\n\nOr via `pip`:\n\n``` sh\npip install tclint\n```",
|
||||
"teal_ls": "https://github.com/teal-language/teal-language-server Install with:\n\n luarocks install teal-language-server\n\nOptional Command Args: \\* \"--log-mode=by_date\" - Enable logging in\n\\$HOME/.cache/teal-language-server. Log name will be date + pid of\nprocess \\* \"--log-mode=by_proj_path\" - Enable logging in\n\\$HOME/.cache/teal-language-server. Log name will be project path + pid\nof process \\* \"--verbose=true\" - Increases log level. Does nothing\nunless log-mode is set",
|
||||
"templ": "https://templ.guide The official language server for the templ HTML\ntemplating language.",
|
||||
"termux_language_server": "https://github.com/termux/termux-language-server Language server for\nvarious bash scripts such as Arch PKGBUILD, Gentoo ebuild, Termux\nbuild.sh, etc.",
|
||||
|
|
@ -358,7 +359,8 @@
|
|||
"visualforce_ls": "https://github.com/forcedotcom/salesforcedx-vscode Language server for\nVisualforce. For manual installation, download the .vsix archive file\nfrom the\n[forcedotcom/salesforcedx-vscode](https://github.com/forcedotcom/salesforcedx-vscode)\nGitHub releases. Then, configure `cmd` to run the Node script at the\nunpacked location:\n\n``` lua\nvim.lsp.config('visualforce_ls', {\n cmd = {\n 'node',\n '/path/to/unpacked/archive/extension/node_modules/@salesforce/salesforcedx-visualforce-language-server/out/src/visualforceServer.js',\n '--stdio'\n }\n})\n```",
|
||||
"vls": "https://github.com/vlang/vls V language server. `v-language-server` can\nbe installed by following the instructions\n[here](https://github.com/vlang/vls#installation).",
|
||||
"volar": "Renamed to [vue_ls](#vue_ls)",
|
||||
"vscoqtop": "https://github.com/coq-community/vscoq",
|
||||
"vscoqtop": "Renamed to [vsrocq](#vsrocq)",
|
||||
"vsrocq": "https://github.com/rocq-prover/vsrocq",
|
||||
"vtsls": "https://github.com/yioneko/vtsls `vtsls` can be installed with npm:\n\n``` sh\nnpm install -g @vtsls/language-server\n```\n\nTo configure a TypeScript project, add a\n[`tsconfig.json`](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html)\nor\n[`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig)\nto the root of your project. \\### Vue support Since v3.0.0, the Vue\nlanguage server requires `vtsls` to support TypeScript.\n\n -- If you are using mason.nvim, you can get the ts_plugin_path like this\n -- For Mason v1,\n -- local mason_registry = require('mason-registry')\n -- local vue_language_server_path = mason_registry.get_package('vue-language-server'):get_install_path() .. '/node_modules/@vue/language-server'\n -- For Mason v2,\n -- local vue_language_server_path = vim.fn.expand '$MASON/packages' .. '/vue-language-server' .. '/node_modules/@vue/language-server'\n -- or even\n -- local vue_language_server_path = vim.fn.stdpath('data') .. \"/mason/packages/vue-language-server/node_modules/@vue/language-server\"\n local vue_language_server_path = '/path/to/@vue/language-server'\n local vue_plugin = {\n name = '@vue/typescript-plugin',\n location = vue_language_server_path,\n languages = { 'vue' },\n configNamespace = 'typescript',\n }\n vim.lsp.config('vtsls', {\n settings = {\n vtsls = {\n tsserver = {\n globalPlugins = {\n vue_plugin,\n },\n },\n },\n },\n filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },\n })\n\n- `location` MUST be defined. If the plugin is installed in\n `node_modules`, `location` can have any value.\n- `languages` must include vue even if it is listed in filetypes.\n- `filetypes` is extended here to include Vue SFC. You must make sure\n the Vue language server is setup. For example,\n\n<!-- -->\n\n vim.lsp.enable('vue_ls')\n\nSee `vue_ls` section and\nhttps://github.com/vuejs/language-tools/wiki/Neovim for more\ninformation. \\### Monorepo support `vtsls` supports monorepos by\ndefault. It will automatically find the `tsconfig.json` or\n`jsconfig.json` corresponding to the package you are working on. This\nworks without the need of spawning multiple instances of `vtsls`, saving\nmemory. It is recommended to use the same version of TypeScript in all\npackages, and therefore have it available in your workspace root. The\nlocation of the TypeScript binary will be determined automatically, but\nonly once.",
|
||||
"vue_ls": "https://github.com/vuejs/language-tools/tree/master/packages/language-server\nThe official language server for Vue It can be installed via npm:\n\n``` sh\nnpm install -g @vue/language-server\n```\n\nThe language server only supports Vue 3 projects by default. For Vue 2\nprojects, [additional\nconfiguration](https://github.com/vuejs/language-tools/blob/master/extensions/vscode/README.md?plain=1#L19)\nare required. The Vue language server works in \"hybrid mode\" that\nexclusively manages the CSS/HTML sections. You need the `vtsls` server\nwith the `@vue/typescript-plugin` plugin to support TypeScript in `.vue`\nfiles. See `vtsls` section and\nhttps://github.com/vuejs/language-tools/wiki/Neovim for more\ninformation. NOTE: Since v3.0.0, the Vue Language Server [no longer\nsupports takeover\nmode](https://github.com/vuejs/language-tools/pull/5248).",
|
||||
"wasm_language_tools": "https://github.com/g-plane/wasm-language-tools WebAssembly Language\nTools aims to provide and improve the editing experience of WebAssembly\nText Format. It also provides an out-of-the-box formatter (a.k.a. pretty\nprinter) for WebAssembly Text Format.",
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
"delphi_ls",
|
||||
"drools_lsp",
|
||||
"haxe_language_server",
|
||||
"leanls",
|
||||
"openedge_ls",
|
||||
"pkgbuild_language_server",
|
||||
"relay_lsp",
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ let
|
|||
# Get suboptions of `lsp.servers.<name>`
|
||||
(opts: opts.${name}.type.getSubOptions opts.${name}.loc)
|
||||
# Get the default package
|
||||
(opts: opts.package.default or null)
|
||||
# The default throws if mkPackageOption can't find the package
|
||||
# E.g. mismatched nixpkgs revision
|
||||
(package: (builtins.tryEval package).value)
|
||||
#
|
||||
# Use tryEval to catch throws when mkPackageOption can't find the package,
|
||||
# e.g., due to a mismatched nixpkgs revision
|
||||
(opts: (builtins.tryEval (opts.package.default or null)).value)
|
||||
# Get package's homepage
|
||||
(package: package.meta.homepage or null)
|
||||
];
|
||||
|
|
@ -60,11 +60,11 @@ let
|
|||
default = { };
|
||||
};
|
||||
|
||||
# Combine `packages` and `customCmd` sets from `lsp-packages.nix`
|
||||
# Combine `packages` and `customCmd` sets from `packages.nix`
|
||||
# We use this set to generate the package-option defaults
|
||||
serverPackages =
|
||||
let
|
||||
inherit (import ../../../plugins/lsp/lsp-packages.nix)
|
||||
inherit (import ./packages.nix)
|
||||
packages
|
||||
customCmd
|
||||
;
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@
|
|||
"gh_actions_ls"
|
||||
"ghdl_ls"
|
||||
"ginko_ls"
|
||||
"gitlab_duo"
|
||||
"glasgow"
|
||||
"glint"
|
||||
"gnls"
|
||||
|
|
@ -153,6 +154,7 @@
|
|||
"stylua3p_ls"
|
||||
"svlangserver"
|
||||
"tabby_ml"
|
||||
"tclsp"
|
||||
"termux_language_server"
|
||||
"textlsp"
|
||||
"theme_check"
|
||||
|
|
@ -278,7 +280,7 @@
|
|||
just = "just-lsp";
|
||||
koka = "koka";
|
||||
kotlin_language_server = "kotlin-language-server";
|
||||
leanls = "lean4";
|
||||
lean3ls = "lean4";
|
||||
lemminx = "lemminx";
|
||||
lsp_ai = "lsp-ai";
|
||||
ltex = "ltex-ls";
|
||||
|
|
@ -426,6 +428,10 @@
|
|||
vimls = "vim-language-server";
|
||||
vls = "vlang";
|
||||
volar = "vue-language-server";
|
||||
vsrocq = [
|
||||
"rocqPackages"
|
||||
"vsrocq-language-server"
|
||||
];
|
||||
vtsls = "vtsls";
|
||||
vue_ls = "vue-language-server";
|
||||
wgsl_analyzer = "wgsl-analyzer";
|
||||
|
|
@ -4,6 +4,10 @@
|
|||
package ? null,
|
||||
config ? null,
|
||||
}@args:
|
||||
let
|
||||
displayName = name;
|
||||
packageName = package.name or args.name or "language server";
|
||||
in
|
||||
{
|
||||
lib,
|
||||
name,
|
||||
|
|
@ -13,8 +17,6 @@
|
|||
}:
|
||||
let
|
||||
inherit (lib) types;
|
||||
displayName = args.name or "the language server";
|
||||
packageName = package.name or (lib.strings.removePrefix "the " displayName);
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
|
@ -36,10 +38,7 @@ in
|
|||
description = ''
|
||||
Whether to call `vim.lsp.enable()` for ${displayName}.
|
||||
'';
|
||||
default = config.name != "*";
|
||||
defaultText = lib.literalMD ''
|
||||
`true`, unless the server's `name` is `*`
|
||||
'';
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@
|
|||
./context.nix
|
||||
./meta.nix
|
||||
./nixvim-info.nix
|
||||
./version.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
74
modules/misc/version.nix
Normal file
74
modules/misc/version.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
let
|
||||
versionInfo = lib.importTOML ../../version-info.toml;
|
||||
in
|
||||
{
|
||||
options.version = {
|
||||
release = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = versionInfo.release;
|
||||
description = "The Nixvim release.";
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
};
|
||||
|
||||
isUnstable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = versionInfo.unstable;
|
||||
description = "Whether Nixvim is from an unstable branch.";
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
};
|
||||
|
||||
enableNixpkgsReleaseCheck = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Whether to check for release version mismatch between Nixvim and Nixpkgs.
|
||||
|
||||
Using mismatched versions is likely to cause errors and unexpected behavior.
|
||||
It is highly recommended to use corresponding Nixvim and Nixpkgs releases.
|
||||
|
||||
When this option is enabled and a mismatch is detected,
|
||||
a warning will be printed when the Nixvim configuration is evaluated.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = {
|
||||
warnings =
|
||||
let
|
||||
nixvimRelease = config.version.release;
|
||||
libRelease = lib.trivial.release;
|
||||
pkgsRelease = pkgs.lib.trivial.release;
|
||||
releaseMismatch = nixvimRelease != libRelease || nixvimRelease != pkgsRelease;
|
||||
in
|
||||
lib.optional (config.version.enableNixpkgsReleaseCheck && releaseMismatch) ''
|
||||
You are using${
|
||||
if libRelease == pkgsRelease then
|
||||
" Nixvim version ${nixvimRelease} and Nixpkgs version ${libRelease}."
|
||||
else
|
||||
''
|
||||
:
|
||||
- Nixvim version: ${nixvimRelease}
|
||||
- Nixpkgs version used to evaluate Nixvim: ${libRelease}
|
||||
- Nixpkgs version used for packages (`pkgs`): ${pkgsRelease}''
|
||||
}
|
||||
|
||||
Using mismatched versions is likely to cause errors and unexpected behavior.
|
||||
It is highly recommended to use corresponding Nixvim and Nixpkgs releases.
|
||||
|
||||
If you insist, you can disable this warning using:
|
||||
|
||||
${options.version.enableNixpkgsReleaseCheck} = false;
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ in
|
|||
|
||||
# A directory with all the files in it
|
||||
# Implementation based on NixOS's /etc module
|
||||
build.extraFiles = pkgs.runCommandLocal "nvim-config" { } ''
|
||||
build.extraFiles = pkgs.runCommandLocal "nvim-config" { passthru.vimPlugin = true; } ''
|
||||
set -euo pipefail
|
||||
|
||||
makeEntry() {
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ in
|
|||
|
||||
waylandSupport = mkOption {
|
||||
type = types.bool;
|
||||
default = pkgs.stdenv.hostPlatform.isLinux;
|
||||
defaultText = lib.literalExpression "pkgs.stdenv.hostPlatform.isLinux";
|
||||
default = lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.wayland;
|
||||
defaultText = lib.literalExpression "lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.wayland";
|
||||
description = "Enable additional wayland support, such as wl-clipboard for wayland clipboard syncing.";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -8,26 +8,27 @@ let
|
|||
inherit (builtins)
|
||||
filter
|
||||
isString
|
||||
isFunction
|
||||
isAttrs
|
||||
attrValues
|
||||
attrNames
|
||||
concatMap
|
||||
partition
|
||||
;
|
||||
|
||||
inherit (import ./formatter-packages.nix { inherit pkgs lib; }) sType formatter-packages;
|
||||
sTypeList = attrValues sType;
|
||||
isSTypeAttrSet = x: lib.elem (x.mark or null) sTypeList;
|
||||
inherit (import ./formatter-packages.nix { inherit pkgs lib; }) states formatter-packages;
|
||||
in
|
||||
rec {
|
||||
cleanMaybePackageList = filter (x: !isSTypeAttrSet x);
|
||||
|
||||
getPackageByName =
|
||||
getPackageOrStateByName =
|
||||
{ configuredFormatters, overrides }:
|
||||
name:
|
||||
let
|
||||
permittedNames = lib.optionals (lib.isAttrs configuredFormatters) (attrNames configuredFormatters);
|
||||
isSType = x: elem x sTypeList;
|
||||
stateList = map (state: lib.fix (lib.toFunction state)) (attrValues states);
|
||||
isState =
|
||||
maybePackage:
|
||||
lib.throwIf (isFunction maybePackage) "The '${name}' conform-nvim formatter package is a function" (
|
||||
elem maybePackage stateList
|
||||
);
|
||||
notFoundMsg = ''
|
||||
A package for the conform-nvim formatter '${name}' could not be found.
|
||||
It is not a user defined formatter. Is the formatter name correct?
|
||||
|
|
@ -36,15 +37,17 @@ rec {
|
|||
overrides.${name} or formatter-packages.${name} or pkgs.${name}
|
||||
or (throwIfNot (elem name permittedNames) notFoundMsg null);
|
||||
in
|
||||
if isSType maybePackage then
|
||||
if isState maybePackage then
|
||||
{
|
||||
inherit name;
|
||||
mark = maybePackage;
|
||||
wrong = {
|
||||
inherit name;
|
||||
mark = maybePackage;
|
||||
};
|
||||
}
|
||||
else
|
||||
maybePackage;
|
||||
{ right = maybePackage; };
|
||||
|
||||
mkWarnsFromMaybePackageList =
|
||||
mkWarnsFromStates =
|
||||
opts: list:
|
||||
let
|
||||
mkWarn =
|
||||
|
|
@ -61,7 +64,7 @@ rec {
|
|||
}
|
||||
];
|
||||
in
|
||||
concatMap mkWarn (filter isSTypeAttrSet list);
|
||||
concatMap mkWarn list;
|
||||
|
||||
collectFormatters =
|
||||
formatters:
|
||||
|
|
|
|||
|
|
@ -245,21 +245,23 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
let
|
||||
inherit (cfg.autoInstall) enable enableWarnings;
|
||||
inherit (import ./auto-install.nix { inherit pkgs lib; })
|
||||
getPackageByName
|
||||
getPackageOrStateByName
|
||||
collectFormatters
|
||||
cleanMaybePackageList
|
||||
mkWarnsFromMaybePackageList
|
||||
mkWarnsFromStates
|
||||
;
|
||||
getPackageByNameWith = getPackageByName {
|
||||
getPackageOrStateByNameWith = getPackageOrStateByName {
|
||||
configuredFormatters = cfg.settings.formatters;
|
||||
inherit (cfg.autoInstall) overrides;
|
||||
};
|
||||
names = collectFormatters (attrValues cfg.settings.formatters_by_ft or { });
|
||||
packageList = map getPackageByNameWith names;
|
||||
warns = (mkWarnsFromMaybePackageList opts) packageList;
|
||||
formatterNames = collectFormatters (attrValues (cfg.settings.formatters_by_ft or { }));
|
||||
packagesAndStates = lib.foldAttrs (item: acc: [ item ] ++ acc) [ ] (
|
||||
map getPackageOrStateByNameWith formatterNames
|
||||
);
|
||||
in
|
||||
{
|
||||
warnings = lib.mkIf (enable && warns != [ ] && enableWarnings) warns;
|
||||
extraPackages = lib.mkIf enable (cleanMaybePackageList packageList);
|
||||
warnings = lib.mkIf (enable && enableWarnings) (
|
||||
mkWarnsFromStates opts (packagesAndStates.wrong or [ ])
|
||||
);
|
||||
extraPackages = lib.mkIf enable (packagesAndStates.right or [ ]);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,30 +3,34 @@
|
|||
...
|
||||
}:
|
||||
with pkgs;
|
||||
rec {
|
||||
sType = {
|
||||
broken = "broken";
|
||||
darwinOnly = "Darwin only";
|
||||
let
|
||||
states = {
|
||||
broken = _package: "broken";
|
||||
darwinOnly = _package: "Darwin only";
|
||||
unpackaged = "unpackaged";
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
inherit states;
|
||||
formatter-packages = {
|
||||
# 2025-11-15 dependency swift is broken
|
||||
# https://github.com/NixOS/nixpkgs/issues/461474
|
||||
swift = sType.broken;
|
||||
swift_format = sType.broken;
|
||||
swiftformat = sType.broken;
|
||||
swiftlint = sType.broken;
|
||||
swift = states.broken swift;
|
||||
swift_format = states.broken swift-format;
|
||||
swiftformat = states.broken swiftformat;
|
||||
swiftlint = states.broken swiftlint;
|
||||
|
||||
# 2025-10-12 build failure on Darwin
|
||||
smlfmt = if stdenv.isDarwin then sType.broken else smlfmt;
|
||||
smlfmt = if stdenv.isDarwin then states.broken smlfmt else smlfmt;
|
||||
|
||||
# 2025-11-25 build failure
|
||||
roc = states.broken roc;
|
||||
# 2025-09-13 build failure
|
||||
inko = sType.broken;
|
||||
inko = states.broken inko;
|
||||
# 2025-09-17 build failure
|
||||
gci = sType.broken;
|
||||
gci = states.broken gci;
|
||||
# 2025-10-08 build failure (haskellPackages.hindent)
|
||||
hindent = sType.broken;
|
||||
hindent = states.broken haskellPackages.hindent;
|
||||
|
||||
format-queries = null; # Uses neovim itself
|
||||
init = null; # Internal thingamajig
|
||||
|
|
@ -34,54 +38,55 @@ rec {
|
|||
trim_newlines = null; # Conform native formatter
|
||||
trim_whitespace = null; # Conform native formatter
|
||||
|
||||
auto_optional = sType.unpackaged;
|
||||
bake = sType.unpackaged;
|
||||
blue = sType.unpackaged;
|
||||
bpfmt = sType.unpackaged;
|
||||
bsfmt = sType.unpackaged;
|
||||
caramel_fmt = sType.unpackaged;
|
||||
crlfmt = sType.unpackaged;
|
||||
darker = sType.unpackaged;
|
||||
dcm_fix = sType.unpackaged;
|
||||
dcm_format = sType.unpackaged;
|
||||
easy-coding-standard = sType.unpackaged;
|
||||
findent = sType.unpackaged;
|
||||
ghokin = sType.unpackaged;
|
||||
gluon_fmt = sType.unpackaged;
|
||||
grain_format = sType.unpackaged;
|
||||
hledger-fmt = sType.unpackaged;
|
||||
imba_fmt = sType.unpackaged;
|
||||
janet-format = sType.unpackaged;
|
||||
json_repair = sType.unpackaged;
|
||||
liquidsoap-prettier = sType.unpackaged;
|
||||
llf = sType.unpackaged;
|
||||
markdown-toc = sType.unpackaged;
|
||||
markdownfmt = sType.unpackaged;
|
||||
mdslw = sType.unpackaged;
|
||||
mojo_format = sType.unpackaged;
|
||||
nomad_fmt = sType.unpackaged;
|
||||
npm-groovy-lint = sType.unpackaged;
|
||||
packer_fmt = sType.unpackaged;
|
||||
pangu = sType.unpackaged;
|
||||
perlimports = sType.unpackaged;
|
||||
pint = sType.unpackaged;
|
||||
purs-tidy = sType.unpackaged;
|
||||
pycln = sType.unpackaged;
|
||||
pyink = sType.unpackaged;
|
||||
pymarkdownlnt = sType.unpackaged;
|
||||
reformat-gherkin = sType.unpackaged;
|
||||
rescript-format = sType.unpackaged;
|
||||
runic = sType.unpackaged;
|
||||
spotless_gradle = sType.unpackaged;
|
||||
spotless_maven = sType.unpackaged;
|
||||
standard-clj = sType.unpackaged;
|
||||
standardjs = sType.unpackaged;
|
||||
tlint = sType.unpackaged;
|
||||
twig-cs-fixer = sType.unpackaged;
|
||||
typstfmt = sType.unpackaged;
|
||||
vsg = sType.unpackaged;
|
||||
ziggy = sType.unpackaged;
|
||||
ziggy_schema = sType.unpackaged;
|
||||
auto_optional = states.unpackaged;
|
||||
bake = states.unpackaged;
|
||||
blue = states.unpackaged;
|
||||
bpfmt = states.unpackaged;
|
||||
bsfmt = states.unpackaged;
|
||||
caramel_fmt = states.unpackaged;
|
||||
crlfmt = states.unpackaged;
|
||||
darker = states.unpackaged;
|
||||
dcm_fix = states.unpackaged;
|
||||
dcm_format = states.unpackaged;
|
||||
easy-coding-standard = states.unpackaged;
|
||||
findent = states.unpackaged;
|
||||
ghokin = states.unpackaged;
|
||||
gluon_fmt = states.unpackaged;
|
||||
grain_format = states.unpackaged;
|
||||
hledger-fmt = states.unpackaged;
|
||||
imba_fmt = states.unpackaged;
|
||||
janet-format = states.unpackaged;
|
||||
json_repair = states.unpackaged;
|
||||
liquidsoap-prettier = states.unpackaged;
|
||||
llf = states.unpackaged;
|
||||
markdown-toc = states.unpackaged;
|
||||
markdownfmt = states.unpackaged;
|
||||
mdslw = states.unpackaged;
|
||||
mojo_format = states.unpackaged;
|
||||
nomad_fmt = states.unpackaged;
|
||||
npm-groovy-lint = states.unpackaged;
|
||||
packer_fmt = states.unpackaged;
|
||||
pangu = states.unpackaged;
|
||||
perlimports = states.unpackaged;
|
||||
pint = states.unpackaged;
|
||||
purs-tidy = states.unpackaged;
|
||||
pycln = states.unpackaged;
|
||||
pyink = states.unpackaged;
|
||||
pymarkdownlnt = states.unpackaged;
|
||||
reformat-gherkin = states.unpackaged;
|
||||
rescript-format = states.unpackaged;
|
||||
runic = states.unpackaged;
|
||||
spotless_gradle = states.unpackaged;
|
||||
spotless_maven = states.unpackaged;
|
||||
standard-clj = states.unpackaged;
|
||||
standardjs = states.unpackaged;
|
||||
tclfmt = states.unpackaged;
|
||||
tlint = states.unpackaged;
|
||||
twig-cs-fixer = states.unpackaged;
|
||||
typstfmt = states.unpackaged;
|
||||
vsg = states.unpackaged;
|
||||
ziggy = states.unpackaged;
|
||||
ziggy_schema = states.unpackaged;
|
||||
|
||||
inherit (python313Packages) autopep8;
|
||||
awk = gawk;
|
||||
|
|
|
|||
|
|
@ -182,7 +182,10 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
(
|
||||
builtins.removeAttrs cfg.setup [
|
||||
"all"
|
||||
# Rename aliases added 2025-06-25 in https://github.com/nix-community/nixvim/pull/3503
|
||||
"warnings"
|
||||
"HTML"
|
||||
"JSON"
|
||||
]
|
||||
)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,9 @@ lib.nixvim.plugins.mkVimPlugin {
|
|||
{
|
||||
when =
|
||||
config.performance.combinePlugins.enable
|
||||
&& !(builtins.elem "friendly-snippets" config.performance.combinePlugins.standalonePlugins)
|
||||
&& !(builtins.elem "friendly-snippets" (
|
||||
map lib.getName config.performance.combinePlugins.standalonePlugins
|
||||
))
|
||||
&& (enabledConsumers != [ ]);
|
||||
message = ''
|
||||
When using ${options.performance.combinePlugins.enable}, ${options.plugins.friendly-snippets.enable} and ${enabledConsumersPretty}:
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
lspPackages = import ../lsp-packages.nix;
|
||||
lspPackages = import ../../../modules/lsp/servers/packages.nix;
|
||||
|
||||
generatedServers = lib.pipe ../../../generated/lspconfig-servers.json [
|
||||
lib.importJSON
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ let
|
|||
"rustaceanvim"
|
||||
]
|
||||
++ lib.optionals hostPlatform.isDarwin [
|
||||
# 2025-11-26 build failure
|
||||
"nvim-spectre"
|
||||
|
||||
# 2025-11-16 dependencies pyarrow and kvazaar are broken
|
||||
"aider.nvim"
|
||||
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ let
|
|||
errors = lib.concatStringsSep "\n" (
|
||||
checkDeclarations (
|
||||
let
|
||||
inherit (import ../plugins/lsp/lsp-packages.nix) unpackaged packages customCmd;
|
||||
inherit (import ../modules/lsp/servers/packages.nix) unpackaged packages customCmd;
|
||||
in
|
||||
{
|
||||
name = "lsp";
|
||||
declarationFile = "plugins/lsp/lsp-packages.nix";
|
||||
declarationFile = "modules/lsp/servers/packages.nix";
|
||||
|
||||
packages = builtins.attrValues packages;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ let
|
|||
runNvim = false;
|
||||
runCommand = runCommandLocal;
|
||||
};
|
||||
version.enableNixpkgsReleaseCheck = false;
|
||||
}
|
||||
../modules/misc
|
||||
../modules/top-level/test.nix
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{ pkgs }:
|
||||
{
|
||||
example = {
|
||||
lsp.servers = {
|
||||
|
|
@ -254,4 +255,51 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Regression test for mkServerOption:
|
||||
# Ensures tryEval catches missing packages when evaluating the description.
|
||||
# See https://github.com/nix-community/nixvim/issues/4033
|
||||
missing-package =
|
||||
{ lib, options, ... }:
|
||||
let
|
||||
# `lsp.servers.lua_ls` option
|
||||
serverOpt = lib.pipe options.lsp.servers [
|
||||
(opt: opt.type.getSubOptions opt.loc)
|
||||
(opts: opts.lua_ls)
|
||||
];
|
||||
|
||||
# `lsp.servers.lua_ls.package` option
|
||||
packageOpt = (serverOpt.type.getSubOptions serverOpt.loc).package;
|
||||
|
||||
# The lua_ls package attr to remove from pkgs
|
||||
packageName = lib.pipe ../../../modules/lsp/servers/packages.nix [
|
||||
import
|
||||
(lib.getAttr "packages")
|
||||
(lib.getAttr "lua_ls")
|
||||
lib.toList
|
||||
lib.head
|
||||
];
|
||||
in
|
||||
{
|
||||
# Remove lua_ls's package
|
||||
_module.args.pkgs = lib.mkOverride 0 (lib.removeAttrs pkgs [ packageName ]);
|
||||
|
||||
assertions = [
|
||||
{
|
||||
# Expect the lua_ls description to evaluate without a link
|
||||
assertion = serverOpt.description == "The lua_ls language server.\n";
|
||||
message = ''
|
||||
Wrong description for `${serverOpt}`. Found:
|
||||
${serverOpt.description}
|
||||
'';
|
||||
}
|
||||
{
|
||||
# Expect the package default to throw
|
||||
assertion = !(builtins.tryEval packageOpt.default).success;
|
||||
message = "Expected `${packageOpt}`'s default to throw.";
|
||||
}
|
||||
];
|
||||
|
||||
test.buildNixvim = false;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
44
tests/test-sources/modules/version.nix
Normal file
44
tests/test-sources/modules/version.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ pkgs }:
|
||||
{
|
||||
invalid-pkgs =
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
versionInfo = lib.importTOML ../../../version-info.toml;
|
||||
nixvimRelease = versionInfo.release;
|
||||
pkgsRelease = "<invalid>";
|
||||
in
|
||||
{
|
||||
# The test-suite uses `pkgs = mkForce`, so override it.
|
||||
# Overlay `pkgs` with an invalid `release`:
|
||||
_module.args.pkgs = lib.mkOverride 0 (
|
||||
pkgs.extend (
|
||||
final: prev: {
|
||||
lib = prev.lib.extend (
|
||||
final: prev: {
|
||||
trivial = prev.trivial // {
|
||||
release = pkgsRelease;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
test.warnings = expect: [
|
||||
(expect "count" 1)
|
||||
(expect "any" "You are using:")
|
||||
(expect "any" "- Nixvim version: ${nixvimRelease}")
|
||||
(expect "any" "- Nixpkgs version used to evaluate Nixvim: ${nixvimRelease}")
|
||||
(expect "any" "- Nixpkgs version used for packages (`pkgs`): ${pkgsRelease}")
|
||||
(expect "any" "If you insist, you can disable this warning using:")
|
||||
(expect "any" " version.enableNixpkgsReleaseCheck = false;")
|
||||
];
|
||||
|
||||
assertions = [
|
||||
{
|
||||
assertion = config.version.release == nixvimRelease;
|
||||
message = "Expected `config.version.release` to be ${nixvimRelease}, found ${config.version.release}";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -26,81 +26,41 @@
|
|||
keymap = "B";
|
||||
label = "Breakpoints [B]";
|
||||
short_label = " [B]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.views").switch_to_view("breakpoints")
|
||||
end
|
||||
'';
|
||||
};
|
||||
scopes = {
|
||||
keymap = "S";
|
||||
label = "Scopes [S]";
|
||||
short_label = " [S]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.views").switch_to_view("scopes")
|
||||
end
|
||||
'';
|
||||
};
|
||||
exceptions = {
|
||||
keymap = "E";
|
||||
label = "Exceptions [E]";
|
||||
short_label = " [E]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.views").switch_to_view("exceptions")
|
||||
end
|
||||
'';
|
||||
};
|
||||
watches = {
|
||||
keymap = "W";
|
||||
label = "Watches [W]";
|
||||
short_label = " [W]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.views").switch_to_view("watches")
|
||||
end
|
||||
'';
|
||||
};
|
||||
threads = {
|
||||
keymap = "T";
|
||||
label = "Threads [T]";
|
||||
short_label = " [T]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.views").switch_to_view("threads")
|
||||
end
|
||||
'';
|
||||
};
|
||||
repl = {
|
||||
keymap = "R";
|
||||
label = "REPL [R]";
|
||||
short_label = " [R]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.repl").show()
|
||||
end
|
||||
'';
|
||||
};
|
||||
sessions = {
|
||||
keymap = "K";
|
||||
label = "Sessions [K]";
|
||||
short_label = " [K]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.views").switch_to_view("sessions")
|
||||
end
|
||||
'';
|
||||
};
|
||||
console = {
|
||||
keymap = "C";
|
||||
label = "Console [C]";
|
||||
short_label = " [C]";
|
||||
action.__raw = ''
|
||||
function()
|
||||
require("dap-view.term").show()
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
custom_sections.__empty = { };
|
||||
|
|
|
|||
|
|
@ -14,7 +14,11 @@
|
|||
lsp = {
|
||||
enable = true;
|
||||
|
||||
servers.leanls.enable = true;
|
||||
# FIXME: 2025-11-26: Enabling `plugins.lsp.leanls` throws the following warning:
|
||||
# The option definition `plugins.lsp.servers.leanls' in ... no longer has any effect; please remove it.
|
||||
# nvim-lspconfig has switched from its own LSP configuration API to neovim's built-in LSP API.
|
||||
# 'leanls' has not been updated to support neovim's built-in LSP API.
|
||||
# servers.leanls.enable = true;
|
||||
};
|
||||
|
||||
lean = {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Highligt = "Highligt" # TODO: ./plugins/utils/neogen.nix
|
|||
Annote = "Annote" # TODO: ./plugins/lsp/fidget.nix
|
||||
ket = "ket" # ./plugins/utils/sandwich.nix
|
||||
tro = "tro" # ./plugins/utils/spectre.nix
|
||||
protols = "protols" # ./plugins/lsp/lsp-packages.nix
|
||||
protols = "protols" # ./modules/lsp/servers/packages.nix
|
||||
compatibilty = "compatibilty" # ./plugins/by-name/visual-multi/default.nix
|
||||
Maco = "Maco" # ./plugins/by-name/femaco
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,20 @@
|
|||
# DO NOT MODIFY!
|
||||
# This file was generated by ci/version-info/default.nix
|
||||
nixpkgs_rev = "a8d610af3f1a5fb71e23e08434d8d61a466fc942"
|
||||
nixpkgs_rev = "c6f52ebd45e5925c188d1a20119978aa4ffd5ef6"
|
||||
release = "25.11"
|
||||
unstable = true
|
||||
unstable = false
|
||||
|
||||
[versions."25.05"]
|
||||
branch = "nixos-25.05"
|
||||
channel = "nixos-25.05"
|
||||
status = "stable"
|
||||
status = "deprecated"
|
||||
|
||||
[versions."25.11"]
|
||||
branch = "nixos-25.11"
|
||||
channel = "nixos-25.11"
|
||||
status = "stable"
|
||||
|
||||
[versions."26.05"]
|
||||
branch = "main"
|
||||
channel = "nixpkgs-unstable"
|
||||
status = "rolling"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue