Nvim custom plugin repo and fix luasnip warnings #52

Merged
jalil merged 2 commits from nvim-fixes into main 2024-08-10 14:52:33 +02:00
7 changed files with 66 additions and 25 deletions

View file

@ -11,6 +11,25 @@ build-vm:
run-vm: build-vm run-vm: build-vm
QEMU_OPTS="$QEMU_OPTS_WL" result/bin/run-nixos-vm QEMU_OPTS="$QEMU_OPTS_WL" result/bin/run-nixos-vm
update-vim-plugins:
#!/bin/sh
# Use local nixpkgs if available
nixpkgs="$HOME/Dev/nixpkgs"
# copy nixpkgs from local checkout
if [ ! -d "$nixpkgs" ]; then
nixpkgs="$(mktemp -d)"
cp -r /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs/. "$nixpkgs"
cd "$nixpkgs"
git init .
git add .
git commit -m 'dummy commit'
cd -
fi
# update vim plugins
nix run nixpkgs#vimPluginsUpdater -- --nixpkgs "$nixpkgs" --no-commit -i ./nvim/extraPlugins/plugins -o ./nvim/extraPlugins/generated.nix update
# format the generated output
nix fmt ./nvim/extraPlugins/generated.nix
# Amend Update flake.lock PR # Amend Update flake.lock PR
flake-pr: flake-pr:
git branch -D update_flake_lock_action || echo "no previous update branch" git branch -D update_flake_lock_action || echo "no previous update branch"

View file

@ -1,5 +1,11 @@
{ pkgs }: { pkgs }:
let
overlay = pkgs.callPackage ./generated.nix {
inherit (pkgs.vimUtils) buildVimPlugin buildNeovimPlugin;
};
plugins = overlay pkgs pkgs;
in
{ {
vim-jjdescription = pkgs.callPackage ./vim-jjdescription.nix { }; inherit overlay;
nvim-silicon = pkgs.callPackage ./nvim-silicon.nix { }; inherit (plugins) vim-jjdescription nvim-silicon;
} }

View file

@ -0,0 +1,35 @@
# GENERATED by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!
{
lib,
buildVimPlugin,
buildNeovimPlugin,
fetchFromGitHub,
fetchgit,
}:
final: prev: {
nvim-silicon = buildVimPlugin {
pname = "nvim-silicon";
version = "2024-07-30";
src = fetchFromGitHub {
owner = "michaelrommel";
repo = "nvim-silicon";
rev = "feb882f04c992b797daa118101a239fb3bedfc04";
sha256 = "03dy4q2dbgiyydi9wvpij6s2aggdpr3lgd9cqqv0i2m1m0qb9gad";
};
meta.homepage = "https://github.com/michaelrommel/nvim-silicon/";
};
vim-jjdescription = buildVimPlugin {
pname = "vim-jjdescription";
version = "2024-05-28";
src = fetchFromGitHub {
owner = "avm99963";
repo = "vim-jjdescription";
rev = "ca14325202f3cd894d01ba833451017624249222";
sha256 = "1y83fdih991ivlvgcwp0sx97icmf9k6px7mr26vb77izjlf011w2";
};
meta.homepage = "https://github.com/avm99963/vim-jjdescription/";
};
}

View file

@ -1,10 +0,0 @@
{ vimUtils, fetchFromGitHub }:
vimUtils.buildVimPlugin {
name = "nvim-silicon";
src = fetchFromGitHub {
owner = "michaelrommel";
repo = "nvim-silicon";
rev = "v1.0.0";
hash = "sha256-cZOzgzLUNC9qOS2m/rc6YJfpNGdRTSCAdEPQDy+wT6I=";
};
}

View file

@ -0,0 +1,3 @@
repo,branch,alias
https://github.com/michaelrommel/nvim-silicon/,,
https://github.com/avm99963/vim-jjdescription/,,

View file

@ -1,10 +0,0 @@
{ vimUtils, fetchFromGitHub }:
vimUtils.buildVimPlugin {
name = "jjdescription";
src = fetchFromGitHub {
owner = "avm99963";
repo = "vim-jjdescription";
rev = "c9bf9f849ead3961ae38ab33f68306996e64c6e8";
hash = "sha256-qnZFuXbzpm2GN/+CfksFfW2O+qTosUZcUagqCTzmtWo=";
};
}

View file

@ -209,9 +209,7 @@ in
}; };
luasnip = { luasnip = {
enable = true; enable = true;
extraConfig = { settings.update_events = "TextChanged,TextChangedI";
update_events = "TextChanged,TextChangedI";
};
}; };
noice = { noice = {
enable = true; enable = true;