dev: listArgs

a helper function to convert a list of strings to a single string
This commit is contained in:
raf 2023-08-19 12:03:18 +03:00
commit 37d5f249f0
No known key found for this signature in database
GPG key ID: 02D1DD3FA08B6B29
2 changed files with 6 additions and 1 deletions

View file

@ -34,4 +34,9 @@ in {
if builtins.isString v
then 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);
}