modules: start breaking down core modules; simplify tree structure

This commit is contained in:
raf 2024-02-17 04:02:15 +03:00
commit 370913e827
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
242 changed files with 178 additions and 124 deletions

View file

@ -0,0 +1,27 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf nvim optionalString;
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}"
}
''}
})
'';
};
}

View file

@ -0,0 +1,6 @@
_: {
imports = [
./lsp-signature.nix
./config.nix
];
}

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
inherit (lib) mkEnableOption;
in {
options.vim.lsp = {
lspSignature = {
enable = mkEnableOption "lsp signature viewer";
};
};
}