feat(nvim): add nvim-devdocs

Moritz Böhme 2023-09-29 20:07:30 +02:00
parent 23c7e77275
commit 28ac81cee5
Signed by: moritz
GPG Key ID: 970C6E89EB0547A9
4 changed files with 60 additions and 0 deletions

View File

@ -863,6 +863,22 @@
"type": "github"
}
},
"nvim-devdocs": {
"flake": false,
"locked": {
"lastModified": 1695706852,
"narHash": "sha256-Hwq3iGS8mY4WISyrBoRZIzWW5aozQEy9yeYcBxKYEy4=",
"owner": "luckasRanarison",
"repo": "nvim-devdocs",
"rev": "8e0cb37b2bd35f6025074b3d4c6f62d77b21836c",
"type": "github"
},
"original": {
"owner": "luckasRanarison",
"repo": "nvim-devdocs",
"type": "github"
}
},
"nvim-treesitter": {
"flake": false,
"locked": {
@ -939,6 +955,7 @@
"nix-lazy-nvim": "nix-lazy-nvim",
"nix-super": "nix-super",
"nixpkgs": "nixpkgs_7",
"nvim-devdocs": "nvim-devdocs",
"nvim-treesitter": "nvim-treesitter",
"pre-commit-hooks": "pre-commit-hooks",
"rofi-wayland": "rofi-wayland",

View File

@ -56,6 +56,9 @@
actions-preview-nvim.flake = false;
actions-preview-nvim.url = "github:aznhe21/actions-preview.nvim";
nvim-devdocs.flake = false;
nvim-devdocs.url = "github:luckasRanarison/nvim-devdocs";
nix-lazy-nvim.url = "git+https://git.moritzboeh.me/moritz/NixLazy.nvim";
# Hyprland

View File

@ -313,5 +313,39 @@ with builtins;
];
opts = { };
}
{
plugin = nvim-devdocs;
dependencies = [
{ plugin = plenary-nvim; }
{ plugin = telescope-nvim; }
{ plugin = nvim-treesitter; }
];
opts = {
previewer_cmd = lib.getExe pkgs.glow;
picker_cmd = lib.getExe pkgs.glow;
picker_cmd_args = [ "-p" ];
telescope = {
layout_strategy = "vertical";
layout_config = {
prompt_position = "top";
};
};
};
cmd = [
"DevdocsFetch"
"DevdocsInstall"
"DevdocsUninstall"
"DevdocsOpen"
"DevdocsOpenFloat"
"DevdocsOpenCurrent"
"DevdocsOpenCurrentFloat"
"DevdocsUpdate"
"DevdocsUpdateAll"
];
keys = [
{ key = "<leader>fd"; cmd = "<cmd>DevdocsOpenCurrentFloat<cr>"; desc = "Search documentation"; }
{ key = "<leader>fD"; cmd = "<cmd>DevdocsOpenFloat<cr>"; desc = "Search documentation (all installed)"; }
];
}
];
}

View File

@ -37,5 +37,11 @@ with lib.my;
version = mkVersionInput inputs.nvim-treesitter;
src = inputs.nvim-treesitter;
});
nvim-devdocs = prev.vimUtils.buildVimPluginFrom2Nix {
pname = "nvim-devdocs";
version = mkVersionInput inputs.nvim-devdocs;
src = inputs.nvim-devdocs;
};
};
}