From a40d8ed7e05667823576e2efd9dbd3cbb4ec254b Mon Sep 17 00:00:00 2001 From: Ivan Ivanov <54508530+divakaivan@users.noreply.github.com> Date: Thu, 8 May 2025 20:58:44 +0900 Subject: [PATCH 1/3] docs: Add zig lsp options --- docs/extras/lang/zig.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/extras/lang/zig.md b/docs/extras/lang/zig.md index ce82de853..349a70fc9 100644 --- a/docs/extras/lang/zig.md +++ b/docs/extras/lang/zig.md @@ -67,7 +67,25 @@ opts = { "neovim/nvim-lspconfig", opts = { servers = { - zls = {}, + zls = { + enable_inlay_hints = true, + enable_argument_placeholders = false, + enable_build_on_save = false, + enable_snippets = false, + warn_style = true, + highlight_global_var_declarations = false, + semantic_tokens = "full", -- full, partial, ??? + inlay_hints_show_variable_type_hints = true, + inlay_hints_show_struct_literal_field_type = false, + inlay_hints_show_parameter_name = false, + inlay_hints_show_builtin = false, + inlay_hints_exclude_single_argument = false, + inlay_hints_hide_redundant_param_names = false, + inlay_hints_hide_redundant_param_names_last_token = false, + force_autofix = true, + prefer_ast_check_as_child_process = true, + completion_label_details = true, + }, }, }, } From aa521d07a75c5579e51ebe915a3e9d92ecda1f2a Mon Sep 17 00:00:00 2001 From: Ivan Ivanov <54508530+divakaivan@users.noreply.github.com> Date: Thu, 8 May 2025 21:09:24 +0900 Subject: [PATCH 2/3] docs: Fix settings/zls nesting --- docs/extras/lang/zig.md | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/docs/extras/lang/zig.md b/docs/extras/lang/zig.md index 349a70fc9..09020d5d5 100644 --- a/docs/extras/lang/zig.md +++ b/docs/extras/lang/zig.md @@ -68,23 +68,27 @@ opts = { opts = { servers = { zls = { - enable_inlay_hints = true, - enable_argument_placeholders = false, - enable_build_on_save = false, - enable_snippets = false, - warn_style = true, - highlight_global_var_declarations = false, - semantic_tokens = "full", -- full, partial, ??? - inlay_hints_show_variable_type_hints = true, - inlay_hints_show_struct_literal_field_type = false, - inlay_hints_show_parameter_name = false, - inlay_hints_show_builtin = false, - inlay_hints_exclude_single_argument = false, - inlay_hints_hide_redundant_param_names = false, - inlay_hints_hide_redundant_param_names_last_token = false, - force_autofix = true, - prefer_ast_check_as_child_process = true, - completion_label_details = true, + settings = { + zls = { + enable_inlay_hints = true, + enable_argument_placeholders = false, + enable_build_on_save = false, + enable_snippets = false, + warn_style = true, + highlight_global_var_declarations = false, + semantic_tokens = "full", -- full, partial, ??? + inlay_hints_show_variable_type_hints = true, + inlay_hints_show_struct_literal_field_type = false, + inlay_hints_show_parameter_name = false, + inlay_hints_show_builtin = false, + inlay_hints_exclude_single_argument = false, + inlay_hints_hide_redundant_param_names = false, + inlay_hints_hide_redundant_param_names_last_token = false, + force_autofix = true, + prefer_ast_check_as_child_process = true, + completion_label_details = true, + }, + }, }, }, }, From 08c183b6917ffcec3163a6f4921d0322cfde7afc Mon Sep 17 00:00:00 2001 From: Ivan Ivanov <54508530+divakaivan@users.noreply.github.com> Date: Thu, 8 May 2025 21:21:01 +0900 Subject: [PATCH 3/3] docs: Add zig lsp defaults from official docs https://github.com/zigtools/zls/blob/master/schema.json --- docs/extras/lang/zig.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/docs/extras/lang/zig.md b/docs/extras/lang/zig.md index 09020d5d5..589c36dcf 100644 --- a/docs/extras/lang/zig.md +++ b/docs/extras/lang/zig.md @@ -70,23 +70,29 @@ opts = { zls = { settings = { zls = { - enable_inlay_hints = true, - enable_argument_placeholders = false, - enable_build_on_save = false, - enable_snippets = false, - warn_style = true, - highlight_global_var_declarations = false, - semantic_tokens = "full", -- full, partial, ??? - inlay_hints_show_variable_type_hints = true, - inlay_hints_show_struct_literal_field_type = false, - inlay_hints_show_parameter_name = false, - inlay_hints_show_builtin = false, - inlay_hints_exclude_single_argument = false, - inlay_hints_hide_redundant_param_names = false, - inlay_hints_hide_redundant_param_names_last_token = false, - force_autofix = true, - prefer_ast_check_as_child_process = true, - completion_label_details = true, + enable_snippets = true, -- Enables snippet completions when the client supports them + enable_argument_placeholders = true, -- Enables function argument placeholder completions + completion_label_details = true, -- Shows function signature in completion results + enable_build_on_save = nil, -- Enables build-on-save diagnostics if a 'check' step is present + build_on_save_args = {}, -- Arguments to pass when running build-on-save + semantic_tokens = "full", -- Level of semantic tokens (none, partial, full) + inlay_hints_show_variable_type_hints = true, -- Enables inlay hints for variable types + inlay_hints_show_struct_literal_field_type = true, -- Enables inlay hints for struct and union literal fields + inlay_hints_show_parameter_name = true, -- Enables inlay hints for parameter names + inlay_hints_show_builtin = true, -- Enables inlay hints for builtin functions + inlay_hints_exclude_single_argument = true, -- Disables inlay hints for single argument calls + inlay_hints_hide_redundant_param_names = false, -- Does not hide redundant parameter names + inlay_hints_hide_redundant_param_names_last_token = false, -- Does not hide redundant param names in complex expressions + force_autofix = false, -- Does not force auto-fix for unsupported editors + warn_style = false, -- Disables warnings for style guideline mismatches + highlight_global_var_declarations = false, -- Does not highlight global variable declarations + skip_std_references = false, -- Includes standard library references in searches + prefer_ast_check_as_child_process = true, -- Uses 'zig ast-check' as a child process if preferred + builtin_path = nil, -- Path to 'builtin' module if overridden + zig_lib_path = nil, -- Custom Zig library path if specified + zig_exe_path = nil, -- Path to the Zig executable if specified + build_runner_path = nil, -- Custom build runner path + global_cache_path = nil, -- Path for Zig's cache directory }, }, },