mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 16:05:58 +01:00
feat(lsp-signature): custom setup
This commit is contained in:
parent
df8784c65f
commit
379231b43d
2 changed files with 9 additions and 10 deletions
|
@ -5,7 +5,7 @@
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
inherit (lib.strings) optionalString;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
cfg = config.vim.lsp;
|
cfg = config.vim.lsp;
|
||||||
in {
|
in {
|
||||||
|
@ -15,16 +15,14 @@ in {
|
||||||
"lsp-signature"
|
"lsp-signature"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
lsp.lspSignature.setupOpts = {
|
||||||
|
bind = config.vim.ui.borders.plugins.lsp-signature.enable;
|
||||||
|
handler_opts.border = config.vim.ui.borders.plugins.lsp-signature.style;
|
||||||
|
};
|
||||||
|
|
||||||
luaConfigRC.lsp-signature = entryAnywhere ''
|
luaConfigRC.lsp-signature = entryAnywhere ''
|
||||||
-- Enable lsp signature viewer
|
-- Enable lsp signature viewer
|
||||||
require("lsp_signature").setup({
|
require("lsp_signature").setup(${toLuaObject cfg.lspSignature.setupOpts})
|
||||||
${optionalString config.vim.ui.borders.plugins.lsp-signature.enable ''
|
|
||||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
|
||||||
handler_opts = {
|
|
||||||
border = "${config.vim.ui.borders.plugins.lsp-signature.style}"
|
|
||||||
}
|
|
||||||
''}
|
|
||||||
})
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
in {
|
in {
|
||||||
options.vim.lsp = {
|
options.vim.lsp = {
|
||||||
lspSignature = {
|
lspSignature = {
|
||||||
enable = mkEnableOption "lsp signature viewer [lsp-signature]";
|
enable = mkEnableOption "lsp signature viewer";
|
||||||
|
setupOpts = lib.nvim.types.mkPluginSetupOption "lsp-signature" {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue