mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
dev: listArgs
a helper function to convert a list of strings to a single string
This commit is contained in:
parent
105fe86f74
commit
37d5f249f0
2 changed files with 6 additions and 1 deletions
|
|
@ -5,5 +5,5 @@
|
||||||
in {
|
in {
|
||||||
inherit (typesDag) dagOf;
|
inherit (typesDag) dagOf;
|
||||||
inherit (typesPlugin) pluginsOpt extraPluginType;
|
inherit (typesPlugin) pluginsOpt extraPluginType;
|
||||||
inherit (typesLanguage) diagnostics mkGrammarOption;
|
inherit (typesLanguage) diagnostics mkGrammarOption listArgs;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,9 @@ in {
|
||||||
if builtins.isString v
|
if builtins.isString v
|
||||||
then v
|
then v
|
||||||
else lib.getExe v;
|
else lib.getExe v;
|
||||||
|
|
||||||
|
# convert a list of user's LSP args into a list of strings concatenated with commas
|
||||||
|
# for example:
|
||||||
|
# ["--foo" "--bar"] -> "--foo", "--bar"
|
||||||
|
listArgs = args: builtins.concatStringsSep ", " (map (s: "\"${s}\"") args);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue