neovim-flake/modules/lsp/lsp-signature/config.nix
NotAShelf cc1f1b2ed8
feat: per-plugin border styles
defaults to the value of globalStyle, can be overriden
2023-07-26 10:33:01 +03:00

27 lines
650 B
Nix

{
config,
lib,
...
}:
with lib;
with builtins; let
cfg = config.vim.lsp;
in {
config = mkIf (cfg.enable && cfg.lspSignature.enable) {
vim.startPlugins = [
"lsp-signature"
];
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}"
}
''}
})
'';
};
}