modules/editor: add d2-vim plugin

This commit is contained in:
Dmitriy Pleshevskiy 2022-12-01 10:47:59 +03:00
parent 08c22d8d40
commit fd1e179e00
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
4 changed files with 35 additions and 0 deletions

View file

@ -92,6 +92,22 @@
"type": "github"
}
},
"d2-vim": {
"flake": false,
"locked": {
"lastModified": 1667932291,
"narHash": "sha256-NgZqZYDgW31/qm6X9AW3IjhNAVOaQHRq6z7y4vANB0g=",
"owner": "terrastruct",
"repo": "d2-vim",
"rev": "d1cb1e7e22bc0fb4d4034a1b93c2a13cc471acc6",
"type": "github"
},
"original": {
"owner": "terrastruct",
"repo": "d2-vim",
"type": "github"
}
},
"editorconfig-nvim": {
"flake": false,
"locked": {
@ -624,6 +640,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"d2-vim": "d2-vim",
"flake-utils": "flake-utils",
"hardware": "hardware",
"home-manager": "home-manager",

View file

@ -49,6 +49,11 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.utils.follows = "flake-utils";
};
d2-vim = {
url = "github:terrastruct/d2-vim";
flake = false;
};
};
outputs = inputs @ { self, flake-utils, nixpkgs, ... }:

View file

@ -1,5 +1,16 @@
{ config, pkgs, lib, inputs, extraHomeModule ? null, ... }:
let
d2-vim-overlay = final: prev: {
vimPlugins = prev.vimPlugins // {
d2-vim = prev.vimUtils.buildVimPluginFrom2Nix {
name = "vim-d2";
src = inputs.d2-vim;
};
};
};
in
{
nixpkgs.overlays = lib.mkAfter [
inputs.myneovim.overlays.default
@ -7,6 +18,7 @@
inputs.nil.overlays.default
inputs.vnetod.overlays.default
inputs.wired.overlays.default
d2-vim-overlay
];
programs.zsh.enable = true;

View file

@ -7,6 +7,7 @@ let
enableDevIcons = true;
enableTabby = true;
enableOrgMode = true;
extraPlugins = [ pkgs.vimPlugins.d2-vim ];
grammarFileTypes = [
"nix"
"lua"