modules/lsp: add nvim-docs-view

A neovim plugin to display lsp hover documentation in a side panel.
This commit is contained in:
raf 2023-10-26 15:03:58 +03:00
commit ce8fdf0003
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
8 changed files with 110 additions and 12 deletions

View file

@ -0,0 +1,26 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf nvim;
inherit (builtins) toString;
cfg = config.vim.lsp.nvim-docs-view;
in {
config = mkIf cfg.enable {
vim = {
lsp.enable = true;
startPlugins = ["nvim-docs-view"];
luaConfigRC.nvim-docs-view = nvim.dag.entryAnywhere ''
require("docs-view").setup {
position = "${cfg.position}",
width = ${toString cfg.width},
height = ${toString cfg.height},
update_mode = "${cfg.updateMode}",
}
'';
};
};
}