feat(cli/nvf): add custom nix snippet for nvf

This commit is contained in:
Mohammad Rafiq 2025-06-13 05:39:39 +08:00
parent e65b478d21
commit a668db89b3
No known key found for this signature in database
5 changed files with 52 additions and 5 deletions

View file

@ -0,0 +1,8 @@
{ pkgs, ... }:
let
inherit (pkgs.vimUtils) buildVimPlugin;
in
buildVimPlugin {
name = "snippets";
src = ./.;
}

View file

@ -0,0 +1,15 @@
{
"name": "snippets",
"engines": {
"vscode": "^1.11.0"
},
"contributes": {
"snippets": [
{
"language": "nix",
"path": "./snippets/nix.json"
}
]
}
}

View file

@ -0,0 +1,22 @@
{
"module": {
"prefix": "mod",
"body": [
"{ config, lib, ... }:",
"let",
" inherit (lib) mkEnableOption mkIf;",
" cfg = config.$1;",
"in",
"{",
" options.$2 = {",
" enable = mkEnableOption \"$3\";",
" };",
"",
" config = mkIf cfg.enable {",
" $4",
" };",
"}"
],
"description": "empty module"
}
}