Merge pull request #321030 from GaetanLepage/codesnap

vimPlugins.codesnap-nvim: init at 2024-05-08
This commit is contained in:
Gaétan Lepage 2024-06-21 13:20:28 +02:00 committed by GitHub
commit 9b8794fc6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 48 additions and 0 deletions

View File

@ -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 = ''

View File

@ -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/,,