plugins/languages: normalize plugin defaults

This commit is contained in:
Matt Sturgeon 2024-06-11 16:52:49 +01:00
parent a208c7181c
commit 6f408f2bd0
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
12 changed files with 255 additions and 210 deletions

View file

@ -44,7 +44,7 @@ in
'';
};
}
) "{}" "LSP settings.";
) { } "LSP settings.";
ft = {
default = helpers.defaultNullOpts.mkStr "lean" ''
@ -66,7 +66,7 @@ in
Whether to enable expanding of unicode abbreviations.
'';
extra = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) "{}" ''
extra = helpers.defaultNullOpts.mkAttrsOf types.str { } ''
Additional abbreviations.
Example:
@ -159,20 +159,18 @@ in
useWidgets = helpers.defaultNullOpts.mkBool true "Whether to use widgets.";
mappings = helpers.defaultNullOpts.mkNullable (with types; attrsOf str) ''
{
K = "click";
"<CR>" = "click";
gd = "go_to_def";
gD = "go_to_decl";
gy = "go_to_type";
I = "mouse_enter";
i = "mouse_leave";
"<Esc>" = "clear_all";
C = "clear_all";
"<LocalLeader><Tab>" = "goto_last_window";
}
'' "Mappings.";
mappings = helpers.defaultNullOpts.mkAttrsOf types.str {
K = "click";
"<CR>" = "click";
gd = "go_to_def";
gD = "go_to_decl";
gy = "go_to_type";
I = "mouse_enter";
i = "mouse_leave";
"<Esc>" = "clear_all";
C = "clear_all";
"<LocalLeader><Tab>" = "goto_last_window";
} "Mappings.";
};
progressBars = {
@ -222,7 +220,7 @@ in
on_attach = helpers.mkNullOrOption types.str "The LSP handler.";
};
}
) "{}" "Legacy Lean3 LSP settings.";
) { } "Legacy Lean3 LSP settings.";
};
config = mkIf cfg.enable {