nvf/modules/lsp/nvim-docs-view/config.nix

27 lines
544 B
Nix
Raw Normal View History

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