Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kfird214/0856c205ceed1cb30d965378921bc60f to your computer and use it in GitHub Desktop.
Save kfird214/0856c205ceed1cb30d965378921bc60f to your computer and use it in GitHub Desktop.
zig languagne server configurations json schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/product.schema.json",
"title": "zls.json",
"description": "zig language server configuration",
"type": "object",
"properties": {
"enable_snippets": {
"type": "boolean",
"default": false,
"description": "Enables snippet completions when the client also supports them."
},
"enable_ast_check_diagnostics": {
"type": "boolean",
"default": true,
"description": "Whether to enable ast-check diagnostics"
},
"enable_autofix": {
"type": "boolean",
"default": false,
"description": "Whether to automatically fix errors on save. Currently supports adding and removing discards."
},
"enable_import_embedfile_argument_completions": {
"type": "boolean",
"default": false,
"description": "Whether to enable import/embedFile argument completions"
},
"zig_lib_path": {
"type": "string",
"default": null,
"description": "zig library path, e.g. /path/to/zig/lib/zig, used to analyze std library imports."
},
"zig_exe_path": {
"type": "string",
"default": null,
"description": "zig executable path, e.g. /path/to/zig/zig, used to run the custom build runner. If null, zig is looked up in PATH. Will be used to infer the zig standard library path if none is provided."
},
"warn_style": {
"type": "boolean",
"default": false,
"description": "Enables warnings for style guideline mismatches"
},
"build_runner_path": {
"type": "string",
"default": null,
"description": "Path to the build_runner.zig file provided by zls. null is equivalent to ${executable_directory}/build_runner.zig"
},
"global_cache_path": {
"type": "string",
"default": null,
"description": "Path to a directroy that will be used as zig's cache. null is equivalent to ${KnownFloders.Cache}/zls"
},
"enable_semantic_tokens": {
"type": "boolean",
"default": true,
"description": "Enables semantic token support when the client also supports it."
},
"enable_inlay_hints": {
"type": "boolean",
"default": false,
"description": "Enables inlay hint support when the client also supports it."
},
"inlay_hints_show_builtin": {
"type": "boolean",
"default": true,
"description": "Enable inlay hints for builtin functions"
},
"inlay_hints_exclude_single_argument": {
"type": "boolean",
"default": true,
"description": "Don't show inlay hints for single argument calls"
},
"inlay_hints_hide_redundant_param_names": {
"type": "boolean",
"default": false,
"description": "Hides inlay hints when parameter name matches the identifier (e.g. foo: foo)"
},
"inlay_hints_hide_redundant_param_names_last_token": {
"type": "boolean",
"default": false,
"description": "Hides inlay hints when parameter name matches the last token of a parameter node (e.g. foo: bar.foo, foo: &foo)"
},
"operator_completions": {
"type": "boolean",
"default": true,
"description": "Enables * and ? operators in completion lists."
},
"include_at_in_builtins": {
"type": "boolean",
"default": false,
"description": "Whether the @ sign should be part of the completion of builtins."
},
"max_detail_length": {
"type": "integer",
"default": 1048576,
"exclusiveMinimum": 256,
"description": "The detail field of completions is truncated to be no longer than this (in bytes)."
},
"skip_std_references": {
"type": "boolean",
"default": false,
"description": "When true, skips searching for references in std. Improves lookup speed for functions in user's code. Renaming and go-to-definition will continue to work as is."
},
"highlight_global_var_declarations": {
"type": "boolean",
"default": false,
"description": "Whether to highlight global var declarations."
},
"relative_builtin_path": {
"type": "string",
"default": null
},
"build_options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
},
"required": [
"zig_exe_path"
]
}
@kfird214
Copy link
Author

configuration-options of zigtools/zls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment