Skip to content

Commit 15e808b

Browse files
committed
feat: multi-repo setup based on mini.nvim
1 parent 24422f2 commit 15e808b

32 files changed

+83
-668
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
target/
22
.archive.lua
3+
dual/
File renamed without changes.
File renamed without changes.

lua/blink/cmp/README.md renamed to README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Simple hackable codebase
88
- Updates on every keystroke (0.5-4ms non-blocking, single core)
99
- Typo resistant fuzzy with frecncy and proximity bonus
10-
- Extensive LSP support (tracker)
10+
- Extensive LSP support ([tracker](./lsp-support-tracker.md))
1111
- Snippet support (including `friendly-snippets`)
1212
- TODO: Cmdline support
1313
- External sources support (including `nvim-cmp` compatibility layer)
File renamed without changes.
File renamed without changes.

flake.lock

+19-40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+62-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
{
2-
description = "Set of simple, performant neovim plugins";
2+
description = "Super amazing neovim completion plugin";
33

44
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
5+
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
6+
devenv.url = "github:cachix/devenv";
67
flake-parts.url = "github:hercules-ci/flake-parts";
8+
fenix.url = "github:nix-community/fenix";
9+
fenix.inputs.nixpkgs.follows = "nixpkgs";
710
};
811

9-
outputs = inputs@{ flake-parts, nixpkgs, ... }:
12+
nixConfig = {
13+
extra-trusted-public-keys =
14+
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
15+
extra-substituters = "https://devenv.cachix.org";
16+
};
17+
18+
outputs = inputs@{ flake-parts, nixpkgs, fenix, ... }:
1019
flake-parts.lib.mkFlake { inherit inputs; } {
20+
imports = [ inputs.devenv.flakeModule ];
1121
systems = [
1222
"x86_64-linux"
1323
"i686-linux"
@@ -18,15 +28,59 @@
1828

1929
perSystem = { config, self', inputs', pkgs, system, lib, ... }: {
2030
# define the packages provided by this flake
21-
packages = {
22-
blink-nvim = pkgs.vimUtils.buildVimPlugin {
23-
pname = "blink-nvim";
24-
version = "2024-07-25";
31+
packages = let
32+
toolchain = fenix.packages.${system}.minimal.toolchain;
33+
rustPlatform = pkgs.makeRustPlatform {
34+
cargo = toolchain;
35+
rustc = toolchain;
36+
};
37+
fuzzy = rustPlatform.buildRustPackage {
38+
pname = "blink-cmp-lib";
39+
version = "2024-07-26";
2540

2641
src = ./.;
42+
43+
cargoLock = {
44+
lockFile = ./Cargo.lock;
45+
outputHashes = {
46+
"c-marshalling-0.2.0" =
47+
"sha256-eL6nkZOtuLLQ0r31X7uroUUDYZsWOJ9KNXl4NCVNRuw=";
48+
"frizbee-0.1.0" =
49+
"sha256-+Os6ioFXB2K86V/8Z2xNxmO7jo3RLC9VKpuztQRrIgE=";
50+
};
51+
};
2752
};
53+
in {
54+
blink-cmp = pkgs.vimUtils.buildVimPlugin {
55+
pname = "blink-cmp";
56+
version = "2024-07-26";
57+
58+
src = ./.;
59+
60+
preInstall = ''
61+
mkdir -p target/release
62+
ln -s ${fuzzy}/lib/libblink_cmp_fuzzy.so target/release/libblink_cmp_fuzzy.so
63+
'';
2864

29-
default = self'.packages.blink-nvim;
65+
meta = {
66+
description = "Super amazing neovim completion plugin";
67+
homepage = "https://github.com/saghen/blink.cmp";
68+
license = lib.licenses.mit;
69+
maintainers = with lib.maintainers; [ redxtech ];
70+
};
71+
};
72+
73+
default = self'.packages.blink-cmp;
74+
};
75+
76+
# define the default dev environment
77+
devenv.shells.default = {
78+
name = "fuzzy";
79+
80+
languages.rust = {
81+
enable = true;
82+
channel = "nightly";
83+
};
3084
};
3185
};
3286
};
File renamed without changes.

lua/blink/cmp/LICENSE

-21
This file was deleted.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)