id = "zls"
name = "ZLS"
homepage = "https://zigtools.org/zls/"
description = "Language Server for Zig"
executables = ["zls"]
[dotfiles]
paths = ["[configHome]/zls.json"]
secret = []
[[dotfiles.machine_lines]]
file = "[configHome]/zls.json"
format = "json"
match = { key_path = ["zig_exe_path"] }
[commands]
format = 1
label = "Run ZLS"
description = "Start the Zig language server (normally launched by an editor) with logging options. The server speaks LSP on stdio."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = true }
[[commands.source]]
id = "help"
kind = "help"
url = "https://github.com/zigtools/zls/blob/master/src/main.zig"
evidence = """
--config-path [path] Set path to the 'zls.json' configuration file
--log-file [path] Set path to the 'zls.log' log file
--log-level [enum] The Log Level to be used.
err
warn
info (default)
debug
--enable-stderr-logs Write log message to stderr
--disable-lsp-logs Disable LSP 'window/logMessage' messages
"""
[[commands.field]]
id = "config_path"
label = "zls.json path"
type = "path"
path = { kind = "file", role = "input" }
option = ["--config-path"]
sources = ["help"]
[[commands.field]]
id = "log_file"
label = "Log file"
type = "path"
path = { kind = "file", role = "output" }
option = ["--log-file"]
sources = ["help"]
[[commands.field]]
id = "log_level"
label = "Log level"
type = "enum"
option = ["--log-level"]
choices = [{ value = "err", label = "err" }, { value = "warn", label = "warn" }, { value = "info", label = "info (default)" }, { value = "debug", label = "debug" }]
sources = ["help"]
[[commands.field]]
id = "stderr_logs"
label = "Log to stderr"
type = "boolean"
option = ["--enable-stderr-logs"]
sources = ["help"]
[[commands.field]]
id = "no_lsp_logs"
label = "Disable LSP logMessage"
type = "boolean"
option = ["--disable-lsp-logs"]
sources = ["help"]
[[commands.task]]
id = "debug"
label = "Debug logging to a file"
fields = ["log_file", "log_level", "config_path"]
required = ["log_file"]
set = { log_level = ["debug"] }
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["config_path", "log_file", "log_level"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["stderr_logs", "no_lsp_logs"]