mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-02-23 20:12:00 +00:00
Merge branch 'main' into fix-deprecation-warning
This commit is contained in:
commit
e758717813
8 changed files with 85 additions and 45 deletions
|
|
@ -56,6 +56,10 @@
|
|||
treesitter grammars were changed to prefer `grammarPlugins` over
|
||||
`builtGrammars`.
|
||||
|
||||
[NotAShelf](https://github.com/notashelf):
|
||||
|
||||
- Lazyload noice.nvim and nvim-web-devicons on `DeferredUIEnter`
|
||||
|
||||
[jfeo](https://github.com/jfeo):
|
||||
|
||||
[ccc.nvim]: https://github.com/uga-rosa/ccc.nvim
|
||||
|
|
|
|||
18
flake.lock
generated
18
flake.lock
generated
|
|
@ -23,11 +23,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1768135262,
|
||||
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
|
||||
"lastModified": 1769996383,
|
||||
"narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
|
||||
"rev": "57928607ea566b5db3ad13af0e57e921e6b12381",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -38,11 +38,11 @@
|
|||
},
|
||||
"mnw": {
|
||||
"locked": {
|
||||
"lastModified": 1769981889,
|
||||
"narHash": "sha256-ndI7AxL/6auelkLHngdUGVImBiHkG8w2N2fOTKZKn4k=",
|
||||
"lastModified": 1770419553,
|
||||
"narHash": "sha256-b1XqsH7AtVf2dXmq2iyRr2NC1yG7skY7Z6N2MpWHlK4=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "mnw",
|
||||
"rev": "332fed8f43b77149c582f1782683d6aeee1f07cf",
|
||||
"rev": "2aaffa8030d0b262176146adbb6b0e6374ce2957",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -74,11 +74,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1769461804,
|
||||
"narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
|
||||
"lastModified": 1771008912,
|
||||
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
|
||||
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -3,17 +3,18 @@
|
|||
stdenv,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
rust-jemalloc-sys,
|
||||
writeShellScriptBin,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "blink-cmp";
|
||||
version = "1.8.0";
|
||||
version = "1.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Saghen";
|
||||
repo = "blink.cmp";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-JjlcPj7v9J+v1SDBYIub6jFEslLhZGHmsipV1atUAFo=";
|
||||
hash = "sha256-GgodXdWpQoF2z1g1/WvnSpfuhskw0aMcOoyZM5l66q8=";
|
||||
};
|
||||
|
||||
forceShare = [
|
||||
|
|
@ -31,6 +32,16 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
|||
mv "$out/lib" "$out/target/release"
|
||||
'';
|
||||
|
||||
# From the blink.cmp flake
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isAarch64 [rust-jemalloc-sys];
|
||||
|
||||
# NOTE: The only change in frizbee 0.7.0 was nixpkgs incompatible rust semantic changes
|
||||
# Patch just reverts https://github.com/saghen/blink.cmp/commit/cc824ec85b789a54d05241389993c6ab8c040810
|
||||
# Taken from Nixpkgs' blink.cmp derivation, available under the MIT license
|
||||
cargoPatches = [
|
||||
./patches/0001-pin-frizbee.patch
|
||||
];
|
||||
|
||||
cargoHash = "sha256-Qdt8O7IGj2HySb1jxsv3m33ZxJg96Ckw26oTEEyQjfs=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
|||
29
flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch
Normal file
29
flake/pkgs/by-name/blink-cmp/patches/0001-pin-frizbee.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 35bb10e..71c79eb 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -144,9 +144,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
||||
|
||||
[[package]]
|
||||
name = "frizbee"
|
||||
-version = "0.7.0"
|
||||
+version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "4d024031f1a5bc5f19917baa0b618f1067610e35ba23e9f105653fcb27e74f5c"
|
||||
+checksum = "c3365720de81dac18e889afa72f5907aa061c975548da68e2400c056ebc94aec"
|
||||
dependencies = [
|
||||
"multiversion",
|
||||
"rayon",
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 392d1bb..c776c7d 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -9,7 +9,7 @@ crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
regex = "1.11.2"
|
||||
-frizbee = "0.7.0"
|
||||
+frizbee = "0.6.0"
|
||||
mlua = { version = "0.11.3", features = ["module", "luajit"] }
|
||||
thiserror = "2.0.16"
|
||||
blake3 = "1.8.2"
|
||||
|
|
@ -6,8 +6,6 @@
|
|||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.lists) optionals;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.ui.noice;
|
||||
tscfg = config.vim.treesitter;
|
||||
|
|
@ -16,16 +14,15 @@
|
|||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = [
|
||||
"noice-nvim"
|
||||
"nui-nvim"
|
||||
];
|
||||
|
||||
startPlugins = ["nui-nvim"];
|
||||
treesitter.grammars = optionals tscfg.addDefaultGrammars defaultGrammars;
|
||||
|
||||
pluginRC.noice-nvim = entryAnywhere ''
|
||||
require("noice").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
lazy.plugins.noice-nvim = {
|
||||
package = "noice-nvim";
|
||||
setupModule = "noice";
|
||||
event = ["DeferredUIEnter"];
|
||||
inherit (cfg) setupOpts;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,18 +4,17 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.visuals.nvim-web-devicons;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["nvim-web-devicons"];
|
||||
|
||||
pluginRC.nvim-web-devicons = entryAnywhere ''
|
||||
require("nvim-web-devicons").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
lazy.plugins.nvim-web-devicons = {
|
||||
package = "nvim-web-devicons";
|
||||
setupModule = "nvim-web-devicons";
|
||||
event = ["DeferredUIEnter"];
|
||||
inherit (cfg) setupOpts;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.modules) mkRenamedOptionModule;
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) nullOr attrsOf attrs enum;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
|
|
@ -16,27 +16,27 @@ in {
|
|||
variant = mkOption {
|
||||
type = nullOr (enum ["light" "dark"]);
|
||||
default = null;
|
||||
description = "Set the light or dark variant manually, instead of relying on `background`";
|
||||
description = ''
|
||||
Set the light or dark variant manually, instead of relying on `background`
|
||||
'';
|
||||
};
|
||||
|
||||
override = mkOption {
|
||||
type = attrsOf attrs;
|
||||
default = {};
|
||||
example = literalExpression ''
|
||||
{
|
||||
example = {
|
||||
zsh = {
|
||||
name = "Zsh";
|
||||
icon = "";
|
||||
color = "#428850";
|
||||
cterm_color = "65";
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
description = ''
|
||||
Your personal icon overrides.
|
||||
|
||||
You can specify color or cterm_color instead of specifying
|
||||
both of them. DevIcon will be appended to `name`
|
||||
You can specify color or `cterm_color` instead of specifying both of
|
||||
them. `DevIcon` will be appended to `name`
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2129,9 +2129,9 @@
|
|||
},
|
||||
"branch": "master",
|
||||
"submodules": false,
|
||||
"revision": "b8221e42cf7287c4dcde81f232f58d7b947c210d",
|
||||
"url": "https://github.com/nvim-tree/nvim-web-devicons/archive/b8221e42cf7287c4dcde81f232f58d7b947c210d.tar.gz",
|
||||
"hash": "sha256-lVrakFrpIP9lp7sMfMb33KeMPIkcn1qBFVytJzKCfuE="
|
||||
"revision": "746ffbb17975ebd6c40142362eee1b0249969c5c",
|
||||
"url": "https://github.com/nvim-tree/nvim-web-devicons/archive/746ffbb17975ebd6c40142362eee1b0249969c5c.tar.gz",
|
||||
"hash": "sha256-jXWBPcfLwSkWQ/eRbxVDWC7kFOODSsCRmzC3rHKQLhQ="
|
||||
},
|
||||
"obsidian-nvim": {
|
||||
"type": "GitRelease",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue