Skip to content

Commit

Permalink
flake/dev: add nixvim-init command (under 'init' shell command)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Oct 29, 2024
1 parent 7d88235 commit a08f770
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flake-modules/dev/devshell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
command = ''${pkgs.python3.interpreter} ${./list-plugins.py} "$@"'';
help = "List plugins and get implementation infos";
}
{
name = "init";
command = lib.getExe (pkgs.callPackage ./init-script { });
help = "Initialize a new plugin in nixvim";
}
];
};
};
Expand Down
1 change: 1 addition & 0 deletions flake-modules/dev/init-script/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
183 changes: 183 additions & 0 deletions flake-modules/dev/init-script/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions flake-modules/dev/init-script/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "nixvim-init"
version = "0.1.0"
edition = "2021"

[dependencies]
clap = "4.5.20"
13 changes: 13 additions & 0 deletions flake-modules/dev/init-script/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
pkgs,
}:
pkgs.rustPlatform.buildRustPackage {
pname = "nixvim-init";
version = "nightly";

src = ./.;

cargoHash = "sha256-Y4Y5nNfYhfj80+DeCwjee0nRBctO1M9dJ0DwhGfkdF0=";

meta.mainProgram = "nixvim-init";
}
3 changes: 3 additions & 0 deletions flake-modules/dev/init-script/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit a08f770

Please sign in to comment.