mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-02 09:05:55 +00:00
feat(lsp-signature): custom setup
This commit is contained in:
parent
2165b0970a
commit
4b79ed6ef6
2 changed files with 8 additions and 9 deletions
|
|
@ -3,7 +3,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim optionalString;
|
||||
inherit (lib) mkIf nvim;
|
||||
|
||||
cfg = config.vim.lsp;
|
||||
in {
|
||||
|
|
@ -12,16 +12,14 @@ in {
|
|||
"lsp-signature"
|
||||
];
|
||||
|
||||
vim.lsp.lspSignature.setupOpts = {
|
||||
bind = config.vim.ui.borders.plugins.lsp-signature.enable;
|
||||
handler_opts.border = config.vim.ui.borders.plugins.lsp-signature.style;
|
||||
};
|
||||
|
||||
vim.luaConfigRC.lsp-signature = nvim.dag.entryAnywhere ''
|
||||
-- Enable lsp signature viewer
|
||||
require("lsp_signature").setup({
|
||||
${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}"
|
||||
}
|
||||
''}
|
||||
})
|
||||
require("lsp_signature").setup(${nvim.lua.expToLua cfg.lspSignature.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ in {
|
|||
options.vim.lsp = {
|
||||
lspSignature = {
|
||||
enable = mkEnableOption "lsp signature viewer";
|
||||
setupOpts = lib.nvim.types.mkPluginSetupOption "lsp-signature" {};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue