neovim-flake/modules/lsp/nvim-docs-view/config.nix
NotAShelf ce8fdf0003
modules/lsp: add nvim-docs-view
A neovim plugin to display lsp hover documentation in a side panel.
2023-10-26 15:03:58 +03:00

26 lines
544 B
Nix

{
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}",
}
'';
};
};
}