vimPlugins.codesnap-nvim: init at 2024-05-08

This commit is contained in:
Gaetan Lepage
2024-06-19 16:30:51 +02:00
parent bae9958d60
commit ebfd3da415
2 changed files with 50 additions and 2 deletions
@@ -60,6 +60,9 @@
, zsh
, # codeium-nvim dependencies
codeium
, # codesnap-nvim dependencies
clang
, libuv
, # command-t dependencies
getconf
, ruby
@@ -400,6 +403,50 @@
'';
};
codesnap-nvim =
let
version = "1.3.1";
src = fetchFromGitHub {
owner = "mistricky";
repo = "codesnap.nvim";
rev = "refs/tags/v${version}";
hash = "sha256-nS/bAWsBQ1L4M9437Yp6FdmHoogzalKlLIAXnRZyMp0=";
};
codesnap-lib = rustPlatform.buildRustPackage {
pname = "codesnap-lib";
inherit version src;
sourceRoot = "${src.name}/generator";
cargoHash = "sha256-FTQl5WIGEf+RQKYJ4BbIE3cCeN+NYUp7VXIrpxB05tU=";
nativeBuildInputs = [
pkg-config
rustPlatform.bindgenHook
];
buildInputs = [
libuv.dev
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AppKit
];
};
in
buildVimPlugin {
pname = "codesnap.nvim";
inherit version src;
# https://github.com/mistricky/codesnap.nvim/blob/main/scripts/build_generator.sh
postInstall = let
extension = if stdenv.isDarwin then "dylib" else "so";
in ''
cp ${codesnap-lib}/lib/libgenerator.${extension} lua/generator.so
'';
doInstallCheck = true;
nvimRequireCheck = "codesnap";
};
command-t = super.command-t.overrideAttrs {
nativeBuildInputs = [ getconf ruby ];
buildPhase = ''
@@ -191,6 +191,7 @@ https://github.com/neoclide/coc.nvim/,release,
https://github.com/manicmaniac/coconut.vim/,HEAD,
https://github.com/Exafunction/codeium.nvim/,HEAD,
https://github.com/Exafunction/codeium.vim/,HEAD,
https://github.com/mistricky/codesnap.nvim/,HEAD,
https://github.com/gorbit99/codewindow.nvim/,HEAD,
https://github.com/metakirby5/codi.vim/,,
https://github.com/tjdevries/colorbuddy.nvim/,,
@@ -691,7 +692,7 @@ https://github.com/yamatsum/nvim-nonicons/,,
https://github.com/rcarriga/nvim-notify/,,
https://github.com/LhKipp/nvim-nu/,HEAD,
https://github.com/ojroques/nvim-osc52/,,
https://github.com/julienvincent/nvim-paredit,,
https://github.com/julienvincent/nvim-paredit/,,
https://github.com/gpanders/nvim-parinfer/,HEAD,
https://github.com/gennaro-tedesco/nvim-peekup/,,
https://github.com/yorickpeterse/nvim-pqf/,HEAD,
@@ -760,7 +761,7 @@ https://github.com/drewtempelmeyer/palenight.vim/,,
https://github.com/JoosepAlviste/palenightfall.nvim/,,
https://github.com/roobert/palette.nvim/,HEAD,
https://github.com/NLKNguyen/papercolor-theme/,,
https://github.com/dundalek/parpar.nvim,,
https://github.com/dundalek/parpar.nvim/,,
https://github.com/tmsvg/pear-tree/,,
https://github.com/steelsojka/pears.nvim/,,
https://github.com/olimorris/persisted.nvim/,HEAD,