Skip to content

Zig#

Server#

For more information about the LSP server, check zls.

Installation#

For more instructions on how to install manually, check here.

Debugger: Not available#

Available configurations#

lsp-zig-check-for-update#

Type: boolean

Default: t

Whether to automatically check for new updates.


lsp-zig-server-store-path#

Type: file

Default: ~/.emacs.d/.cache/lsp/zig/

The path to the file in which zls will be stored.


lsp-zig-server-version#

Type: file

Default: 0.11.0

The zls version to install.


lsp-zig-trace-server#

Type: (choice (const off) (const messages) (const verbose))

Default: off

Traces the communication between Emacs and the language server.


lsp-zig-zls-build-on-save-step#

Type: string

Default: install

Select which step should be executed on build-on-save.


lsp-zig-zls-build-runner-global-cache-path#

Type: string

Default: ``

Path to a directory that will be used as the global cache path when executing a projects build.zig. null is equivalent to the path shown by zig env.


lsp-zig-zls-build-runner-path#

Type: string

Default: ``

Path to the build_runner.zig file provided by zls. null is equivalent to ${executable_directory}/build_runner.zig.


lsp-zig-zls-builtin-path#

Type: string

Default: ``

Path to builtin; useful for debugging, automatically set if let null.


lsp-zig-zls-completion-label-details#

Type: boolean

Default: nil

When false, the function signature of completion results is hidden. Improves readability in some editors.


lsp-zig-zls-completions-with-replace#

Type: boolean

Default: nil

Completions confirm behavior. If true, replace the text after the cursor.


lsp-zig-zls-dangerous-comptime-experiments-do-not-enable#

Type: boolean

Default: nil

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.


lsp-zig-zls-enable-argument-placeholders#

Type: boolean

Default: t

Whether to enable function argument placeholder completions.


lsp-zig-zls-enable-autofix#

Type: boolean

Default: nil

Whether to automatically fix errors on save. Currently supports adding and removing discards.


lsp-zig-zls-enable-build-on-save#

Type: boolean

Default: nil

Whether to enable build-on-save diagnostics.


lsp-zig-zls-enable-inlay-hints#

Type: boolean

Default: t

Enables inlay hint support when the client also supports it.


lsp-zig-zls-enable-snippets#

Type: boolean

Default: t

Enables snippet completions when the client also supports them.


lsp-zig-zls-executable#

Type: string

Default: zls

The zls executable to use.

Leave as just the executable name to use the default behavior of finding the executable with variable exec-path.


lsp-zig-zls-global-cache-path#

Type: string

Default: ``

Path to a directory that will be used as zigs cache. null is equivalent to${KnownFolders.Cache}/zls`.


lsp-zig-zls-highlight-global-var-declarations#

Type: boolean

Default: nil

Whether to highlight global var declarations.


lsp-zig-zls-inlay-hints-exclude-single-argument#

Type: boolean

Default: t

Don`t show inlay hints for single argument calls.


lsp-zig-zls-inlay-hints-hide-redundant-param-names#

Type: boolean

Default: nil

Hides inlay hints when parameter name matches the identifier (e.g. foo: foo).


lsp-zig-zls-inlay-hints-hide-redundant-param-names-last-token#

Type: boolean

Default: nil

Hides inlay hints when parameter name matches the last token of a parameter node (e.g. foo: bar.foo, foo: &foo).


lsp-zig-zls-inlay-hints-show-builtin#

Type: boolean

Default: t

Don`t show inlay hints for single argument calls.


lsp-zig-zls-inlay-hints-show-parameter-name#

Type: boolean

Default: t

Enable inlay hints for parameter names.


lsp-zig-zls-inlay-hints-show-variable-type-hints#

Type: boolean

Default: t

Enable inlay hints for variable type.


lsp-zig-zls-prefer-ast-check-as-child-process#

Type: boolean

Default: t

Favor using zig ast-check instead of ZLS`s fork.


lsp-zig-zls-record-session#

Type: boolean

Default: nil

When true, zls will record all request is receives and write in into record_session_path, so that they can replayed with zls replay.


lsp-zig-zls-record-session-path#

Type: string

Default: ``

Output file path when record_session is set. The recommended file extension *.zlsreplay.


lsp-zig-zls-replay-session-path#

Type: string

Default: ``

Used when calling zls replay for specifying the replay file. If no extra argument is given record_session_path is used as the default path.


lsp-zig-zls-semantic-tokens#

Type: (choice (const off) (const messages) (const verbose))

Default: partial

Traces the communication between Emacs and the language server.


lsp-zig-zls-skip-std-references#

Type: boolean

Default: nil

hen 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.


lsp-zig-zls-warn-style#

Type: boolean

Default: nil

Enables warnings for style guideline mismatches.


lsp-zig-zls-zig-lib-path#

Type: string

Default: ``

Zig library path. e.g. /path/to/zig/lib/zig, used to analyze std library imports.



Last update: February 27, 2024