2023-02-01 20:11:37 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
2023-11-08 03:16:46 +01:00
|
|
|
}: let
|
2024-03-12 01:46:29 +01:00
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
inherit (lib.nvim.dag) entryAnywhere;
|
2024-02-17 15:41:09 +01:00
|
|
|
inherit (lib.nvim.lua) toLuaObject;
|
2023-11-08 03:16:46 +01:00
|
|
|
|
2023-02-01 20:11:37 +01:00
|
|
|
cfg = config.vim.lsp;
|
|
|
|
in {
|
|
|
|
config = mkIf (cfg.enable && cfg.lspSignature.enable) {
|
2024-03-12 01:46:29 +01:00
|
|
|
vim = {
|
|
|
|
startPlugins = [
|
|
|
|
"lsp-signature"
|
|
|
|
];
|
2023-02-01 20:11:37 +01:00
|
|
|
|
2024-02-17 15:41:09 +01:00
|
|
|
lsp.lspSignature.setupOpts = {
|
|
|
|
bind = config.vim.ui.borders.plugins.lsp-signature.enable;
|
|
|
|
handler_opts.border = config.vim.ui.borders.plugins.lsp-signature.style;
|
|
|
|
};
|
|
|
|
|
2024-07-15 12:40:05 +02:00
|
|
|
pluginRC.lsp-signature = entryAnywhere ''
|
2024-03-12 01:46:29 +01:00
|
|
|
-- Enable lsp signature viewer
|
2024-02-17 15:41:09 +01:00
|
|
|
require("lsp_signature").setup(${toLuaObject cfg.lspSignature.setupOpts})
|
2024-03-12 01:46:29 +01:00
|
|
|
'';
|
|
|
|
};
|
2023-02-01 20:11:37 +01:00
|
|
|
};
|
|
|
|
}
|