Added toString functions on Texlab LSP source booleans and other mapped values

This commit is contained in:
isaacST08 2025-01-18 20:01:08 -07:00
commit a504d8ef37

View file

@ -21,7 +21,12 @@
let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.types) package str bool listOf;
inherit (lib.types)
package
str
bool
listOf
;
inherit (lib.nvim.types) mkGrammarOption;
inherit (builtins) any attrValues;
@ -255,11 +260,6 @@ in
# Texlab
(
let
tl = cfg.lsp.texlab;
build = tl.build;
listToLua =
list: nullOnEmpty:
let
inherit (builtins)
length
@ -267,7 +267,10 @@ in
map
toString
;
in
tl = cfg.lsp.texlab;
build = tl.build;
listToLua =
list: nullOnEmpty:
if length list == 0 then
if nullOnEmpty then "null" else "{ }"
else
@ -281,12 +284,12 @@ in
build = {
executable = "${build.package}/bin/${build.executable}",
args = ${listToLua build.args false},
forwardSearchAfter = ${build.forwardSearchAfter},
onSave = ${build.onSave},
useFileList = ${build.useFileList},
auxDirectory = "${build.auxDirectroy}",
logDirectory = "${build.logDirectroy}",
pdfDirectory = "${build.pdfDirectroy}",
forwardSearchAfter = ${toString build.forwardSearchAfter},
onSave = ${toString build.onSave},
useFileList = ${toString build.useFileList},
auxDirectory = "${toString build.auxDirectroy}",
logDirectory = "${toString build.logDirectroy}",
pdfDirectory = "${toString build.pdfDirectroy}",
${if build.filename != null then ''filename = "${build.filename}",'' else ""}
},
forwardSearch = {