mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 15:35:30 +00:00
Added toString functions on Texlab LSP source booleans and other mapped values
This commit is contained in:
parent
9cded6f6c2
commit
a504d8ef37
1 changed files with 18 additions and 15 deletions
|
|
@ -21,7 +21,12 @@
|
||||||
let
|
let
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.modules) mkIf mkMerge;
|
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 (lib.nvim.types) mkGrammarOption;
|
||||||
inherit (builtins) any attrValues;
|
inherit (builtins) any attrValues;
|
||||||
|
|
||||||
|
|
@ -256,18 +261,16 @@ in
|
||||||
# Texlab
|
# Texlab
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
|
inherit (builtins)
|
||||||
|
length
|
||||||
|
concatStringsSep
|
||||||
|
map
|
||||||
|
toString
|
||||||
|
;
|
||||||
tl = cfg.lsp.texlab;
|
tl = cfg.lsp.texlab;
|
||||||
build = tl.build;
|
build = tl.build;
|
||||||
listToLua =
|
listToLua =
|
||||||
list: nullOnEmpty:
|
list: nullOnEmpty:
|
||||||
let
|
|
||||||
inherit (builtins)
|
|
||||||
length
|
|
||||||
concatStringsSep
|
|
||||||
map
|
|
||||||
toString
|
|
||||||
;
|
|
||||||
in
|
|
||||||
if length list == 0 then
|
if length list == 0 then
|
||||||
if nullOnEmpty then "null" else "{ }"
|
if nullOnEmpty then "null" else "{ }"
|
||||||
else
|
else
|
||||||
|
|
@ -281,12 +284,12 @@ in
|
||||||
build = {
|
build = {
|
||||||
executable = "${build.package}/bin/${build.executable}",
|
executable = "${build.package}/bin/${build.executable}",
|
||||||
args = ${listToLua build.args false},
|
args = ${listToLua build.args false},
|
||||||
forwardSearchAfter = ${build.forwardSearchAfter},
|
forwardSearchAfter = ${toString build.forwardSearchAfter},
|
||||||
onSave = ${build.onSave},
|
onSave = ${toString build.onSave},
|
||||||
useFileList = ${build.useFileList},
|
useFileList = ${toString build.useFileList},
|
||||||
auxDirectory = "${build.auxDirectroy}",
|
auxDirectory = "${toString build.auxDirectroy}",
|
||||||
logDirectory = "${build.logDirectroy}",
|
logDirectory = "${toString build.logDirectroy}",
|
||||||
pdfDirectory = "${build.pdfDirectroy}",
|
pdfDirectory = "${toString build.pdfDirectroy}",
|
||||||
${if build.filename != null then ''filename = "${build.filename}",'' else ""}
|
${if build.filename != null then ''filename = "${build.filename}",'' else ""}
|
||||||
},
|
},
|
||||||
forwardSearch = {
|
forwardSearch = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue