mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
lib/options: remove defaultNullOpts.mkDesc
Leave a stub for now, which aborts with an error message.
This commit is contained in:
parent
6e979dbe94
commit
e51b8b9b5c
1 changed files with 2 additions and 20 deletions
|
@ -166,26 +166,8 @@ rec {
|
||||||
// (optionalAttrs (args ? default) { pluginDefault = args.pluginDefault or args.default; });
|
// (optionalAttrs (args ? default) { pluginDefault = args.pluginDefault or args.default; });
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
# TODO: deprecated in favor of `helpers.pluginDefaultText`
|
# TODO: removed 2024-06-14; remove stub 2024-09-01
|
||||||
mkDesc =
|
mkDesc = abort "mkDesc has been removed. Use the `pluginDefault` argument or `helpers.pluginDefaultText`.";
|
||||||
default: desc:
|
|
||||||
let
|
|
||||||
defaultString = if isString default then default else generators.toPretty { } default;
|
|
||||||
defaultDesc =
|
|
||||||
"_Plugin default:_"
|
|
||||||
+ (
|
|
||||||
# Detect whether `default` is multiline or inline:
|
|
||||||
if hasInfix "\n" defaultString then "\n\n```nix\n${defaultString}\n```" else " `${defaultString}`"
|
|
||||||
);
|
|
||||||
in
|
|
||||||
if desc == "" then
|
|
||||||
defaultDesc
|
|
||||||
else
|
|
||||||
''
|
|
||||||
${desc}
|
|
||||||
|
|
||||||
${defaultDesc}
|
|
||||||
'';
|
|
||||||
|
|
||||||
mkNullable' = args: mkNullOrOption' (convertArgs args);
|
mkNullable' = args: mkNullOrOption' (convertArgs args);
|
||||||
mkNullable =
|
mkNullable =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue