mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-01-19 16:32:24 +00:00
flake: add and package blink.cmp
This commit is contained in:
parent
a5a5aba34a
commit
6aec23d0f0
4 changed files with 82 additions and 0 deletions
34
flake.lock
34
flake.lock
|
@ -167,6 +167,38 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plugin-blink-cmp": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1736295934,
|
||||||
|
"narHash": "sha256-MfHI4efAdaoCU8si6YFdznZmSTprthDq3YKuF91z7ss=",
|
||||||
|
"owner": "saghen",
|
||||||
|
"repo": "blink.cmp",
|
||||||
|
"rev": "1cc3b1a908fbcfd15451c4772759549724f38524",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "saghen",
|
||||||
|
"repo": "blink.cmp",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"plugin-blink-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734896240,
|
||||||
|
"narHash": "sha256-Rrrh+O3FbBnaAnCHwPuQyfhH+XueSkQp6ipEkn6esGY=",
|
||||||
|
"owner": "saghen",
|
||||||
|
"repo": "blink.compat",
|
||||||
|
"rev": "74b251a1e9478c4fa6d7c6bc2921d7124e6f6cbb",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "saghen",
|
||||||
|
"repo": "blink.compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugin-bufdelete-nvim": {
|
"plugin-bufdelete-nvim": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -2084,6 +2116,8 @@
|
||||||
"plugin-aerial-nvim": "plugin-aerial-nvim",
|
"plugin-aerial-nvim": "plugin-aerial-nvim",
|
||||||
"plugin-alpha-nvim": "plugin-alpha-nvim",
|
"plugin-alpha-nvim": "plugin-alpha-nvim",
|
||||||
"plugin-base16": "plugin-base16",
|
"plugin-base16": "plugin-base16",
|
||||||
|
"plugin-blink-cmp": "plugin-blink-cmp",
|
||||||
|
"plugin-blink-compat": "plugin-blink-compat",
|
||||||
"plugin-bufdelete-nvim": "plugin-bufdelete-nvim",
|
"plugin-bufdelete-nvim": "plugin-bufdelete-nvim",
|
||||||
"plugin-catppuccin": "plugin-catppuccin",
|
"plugin-catppuccin": "plugin-catppuccin",
|
||||||
"plugin-ccc": "plugin-ccc",
|
"plugin-ccc": "plugin-ccc",
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -287,6 +287,16 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugin-blink-cmp = {
|
||||||
|
url = "github:saghen/blink.cmp";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
plugin-blink-compat = {
|
||||||
|
url = "github:saghen/blink.compat";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
plugin-nvim-cmp = {
|
plugin-nvim-cmp = {
|
||||||
url = "github:hrsh7th/nvim-cmp";
|
url = "github:hrsh7th/nvim-cmp";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
@ -61,6 +61,10 @@
|
||||||
"flutter-tools.dev_tools"
|
"flutter-tools.dev_tools"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
blink-cmp = pkgs.callPackage ./packages/blink-cmp.nix {
|
||||||
|
src = inputs.plugin-blink-cmp;
|
||||||
|
version = inputs.plugin-blink-cmp.shortRev or inputs.plugin-blink-cmp.shortDirtyRev or "dirty";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
buildConfigPlugins = plugins:
|
buildConfigPlugins = plugins:
|
||||||
|
|
34
modules/wrapper/build/packages/blink-cmp.nix
Normal file
34
modules/wrapper/build/packages/blink-cmp.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
rustPlatform,
|
||||||
|
hostPlatform,
|
||||||
|
vimUtils,
|
||||||
|
git,
|
||||||
|
src,
|
||||||
|
version,
|
||||||
|
}: let
|
||||||
|
blink-fuzzy-lib = rustPlatform.buildRustPackage {
|
||||||
|
pname = "blink-fuzzy-lib";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
nativeBuildInputs = [git];
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = "${src}/Cargo.lock";
|
||||||
|
allowBuiltinFetchGit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
libExt =
|
||||||
|
if hostPlatform.isDarwin
|
||||||
|
then "dylib"
|
||||||
|
else "so";
|
||||||
|
in
|
||||||
|
vimUtils.buildVimPlugin {
|
||||||
|
pname = "blink-cmp";
|
||||||
|
inherit version src;
|
||||||
|
|
||||||
|
# blink references a repro.lua which is placed outside the lua/ directory
|
||||||
|
doCheck = false;
|
||||||
|
preInstall = ''
|
||||||
|
mkdir -p target/release
|
||||||
|
ln -s ${blink-fuzzy-lib}/lib/libblink_cmp_fuzzy.${libExt} target/release/libblink_cmp_fuzzy.${libExt}
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue