mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-19 10:21:18 +00:00
modules/lsp: add nvim-docs-view
A neovim plugin to display lsp hover documentation in a side panel.
This commit is contained in:
parent
30552a9ec3
commit
ce8fdf0003
8 changed files with 110 additions and 12 deletions
26
modules/lsp/nvim-docs-view/config.nix
Normal file
26
modules/lsp/nvim-docs-view/config.nix
Normal 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}",
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue