feat(editor): remove standalone snippets package, move config to nvf module
This commit is contained in:
parent
50e0d971ae
commit
3b5eefe456
6 changed files with 16 additions and 63 deletions
6
flake.lock
generated
6
flake.lock
generated
|
@ -474,11 +474,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750184939,
|
||||
"narHash": "sha256-kbKV8EJjyEEiAL03pQk4k1dUn5VRjYzI0FyDoaPchNc=",
|
||||
"lastModified": 1750247856,
|
||||
"narHash": "sha256-+fGlDHq+4RoURurxUFrSBtHN81EZq0qk1Xn9+7ShmfM=",
|
||||
"owner": "rrvsh",
|
||||
"repo": "nvf",
|
||||
"rev": "7f1acefe918072d9567ac3541ca67581f4c4c02e",
|
||||
"rev": "62494c01644e199c3b31aa617e67adad49a6d56e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -5,23 +5,21 @@
|
|||
setupOpts.enable_autosnippets = true;
|
||||
providers = with pkgs.vimPlugins; [ vim-snippets ];
|
||||
customSnippets.snipmate = {
|
||||
all = [
|
||||
{
|
||||
trigger = "if";
|
||||
body = "if $1 else $2";
|
||||
}
|
||||
];
|
||||
nix = [
|
||||
{
|
||||
trigger = "mkOption";
|
||||
body = ''
|
||||
mkOption {
|
||||
type = $1;
|
||||
default = $2;
|
||||
description = $3;
|
||||
example = $4;
|
||||
}
|
||||
'';
|
||||
trigger = "mod";
|
||||
description = "empty module";
|
||||
body = # nix
|
||||
''
|
||||
{config, lib}:
|
||||
let
|
||||
cfg = config.$1;
|
||||
in
|
||||
{
|
||||
options.$1 = { $2 };
|
||||
config = $3;
|
||||
}
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
@ -7,8 +7,6 @@ in
|
|||
persistDirs = singleton ".local/share/nvf";
|
||||
programs.nvf.enable = true;
|
||||
programs.nvf.settings.vim = {
|
||||
startPlugins = [ pkgs.pantheon.snippets ];
|
||||
|
||||
hideSearchHighlight = true;
|
||||
syntaxHighlighting = true;
|
||||
telescope.enable = true;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs.vimUtils) buildVimPlugin;
|
||||
in
|
||||
buildVimPlugin {
|
||||
name = "snippets";
|
||||
src = ./.;
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"name": "snippets",
|
||||
"engines": {
|
||||
"vscode": "^1.11.0"
|
||||
},
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "nix",
|
||||
"path": "./snippets/nix.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"module": {
|
||||
"prefix": "mod",
|
||||
"body": [
|
||||
"{ config, lib, ... }:",
|
||||
"let",
|
||||
" inherit (lib) mkIf mkEnableOption;",
|
||||
" cfg = config.$1;",
|
||||
"in",
|
||||
"{",
|
||||
" options.$1 = {",
|
||||
" enable = mkEnableOption \"$2\";",
|
||||
" $3",
|
||||
" };",
|
||||
" config = mkIf cfg.enable {$4};",
|
||||
"}"
|
||||
],
|
||||
"description": "empty module"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue