@@ -46,168 +46,157 @@ executable with variable `exec-path'."
46
46
(const " messages" )
47
47
(const " verbose" )))
48
48
49
- (defcustom lsp-zig-check-for-update t
50
- " Whether to automatically check for new updates."
51
- :group 'lsp-zig
52
- :type 'boolean )
53
-
54
- (defcustom lsp-zig-zls-enable-snippets t
49
+ (defcustom lsp-zls-enable-snippets t
55
50
" Enables snippet completions when the client also supports them."
56
51
:group 'lsp-zig
57
52
:type 'boolean )
58
53
59
- (defcustom lsp-zig-zls- enable-argument-placeholders t
54
+ (defcustom lsp-zig-enable-argument-placeholders t
60
55
" Whether to enable function argument placeholder completions."
61
56
:group 'lsp-zig
62
57
:type 'boolean )
63
58
64
- (defcustom lsp-zig-zls- enable-build-on-save nil
59
+ (defcustom lsp-zig-enable-build-on-save nil
65
60
" Whether to enable build-on-save diagnostics."
66
61
:group 'lsp-zig
67
62
:type 'boolean )
68
63
69
- (defcustom lsp-zig-zls- build-on-save-step " install"
64
+ (defcustom lsp-zig-build-on-save-step " install"
70
65
" Select which step should be executed on build-on-save."
71
66
:group 'lsp-zig
72
67
:type 'string )
73
68
74
- (defcustom lsp-zig-zls- enable-autofix nil
69
+ (defcustom lsp-zig-enable-autofix nil
75
70
" Whether to automatically fix errors on save.
76
71
Currently supports adding and removing discards."
77
72
:group 'lsp-zig
78
73
:type 'boolean )
79
74
80
- (defcustom lsp-zig-zls- semantic-tokens " partial"
75
+ (defcustom lsp-zig-semantic-tokens " partial"
81
76
" Traces the communication between Emacs and the language server."
82
77
:group 'lsp-zig
83
78
:type '(choice (const " off" )
84
79
(const " messages" )
85
80
(const " verbose" )))
86
81
87
- (defcustom lsp-zig-zls- enable-inlay-hints t
82
+ (defcustom lsp-zig-enable-inlay-hints t
88
83
" Enables inlay hint support when the client also supports it."
89
84
:group 'lsp-zig
90
85
:type 'boolean )
91
86
92
- (defcustom lsp-zig-zls- inlay-hints-show-variable-type-hints t
87
+ (defcustom lsp-zig-inlay-hints-show-variable-type-hints t
93
88
" Enable inlay hints for variable type."
94
89
:group 'lsp-zig
95
90
:type 'boolean )
96
91
97
- (defcustom lsp-zig-zls- inlay-hints-show-parameter-name t
92
+ (defcustom lsp-zig-inlay-hints-show-parameter-name t
98
93
" Enable inlay hints for parameter names."
99
94
:group 'lsp-zig
100
95
:type 'boolean )
101
96
102
- (defcustom lsp-zig-zls- inlay-hints-exclude-single-argument t
97
+ (defcustom lsp-zig-inlay-hints-exclude-single-argument t
103
98
" Don't show inlay hints for single argument calls."
104
99
:group 'lsp-zig
105
100
:type 'boolean )
106
101
107
- (defcustom lsp-zig-zls- inlay-hints-show-builtin t
102
+ (defcustom lsp-zig-inlay-hints-show-builtin t
108
103
" Don't show inlay hints for single argument calls."
109
104
:group 'lsp-zig
110
105
:type 'boolean )
111
106
112
- (defcustom lsp-zig-zls- inlay-hints-hide-redundant-param-names nil
107
+ (defcustom lsp-zig-inlay-hints-hide-redundant-param-names nil
113
108
" Hides inlay hints when parameter name matches the identifier (e.g. foo: foo)."
114
109
:group 'lsp-zig
115
110
:type 'boolean )
116
111
117
- (defcustom lsp-zig-zls- inlay-hints-hide-redundant-param-names-last-token nil
112
+ (defcustom lsp-zig-inlay-hints-hide-redundant-param-names-last-token nil
118
113
" Hides inlay hints when parameter name matches the last token of a parameter
119
114
node (e.g. foo: bar.foo, foo: &foo)."
120
115
:group 'lsp-zig
121
116
:type 'boolean )
122
117
123
- (defcustom lsp-zig-zls- warn-style nil
118
+ (defcustom lsp-zig-warn-style nil
124
119
" Enables warnings for style guideline mismatches."
125
120
:group 'lsp-zig
126
121
:type 'boolean )
127
122
128
- (defcustom lsp-zig-zls- highlight-global-var-declarations nil
123
+ (defcustom lsp-zig-highlight-global-var-declarations nil
129
124
" Whether to highlight global var declarations."
130
125
:group 'lsp-zig
131
126
:type 'boolean )
132
127
133
- (defcustom lsp-zig-zls- dangerous-comptime-experiments-do-not-enable nil
128
+ (defcustom lsp-zig-dangerous-comptime-experiments-do-not-enable nil
134
129
" When true, skips searching for references in std.
135
130
Improves lookup speed for functions in user's code. Renaming and
136
131
go-to-definition will continue to work as is."
137
132
:group 'lsp-zig
138
133
:type 'boolean )
139
134
140
- (defcustom lsp-zig-zls- skip-std-references nil
135
+ (defcustom lsp-zig-skip-std-references nil
141
136
" hen true, skips searching for references in std.
142
137
Improves lookup speed for functions in user's code. Renaming and
143
138
go-to-definition will continue to work as is."
144
139
:group 'lsp-zig
145
140
:type 'boolean )
146
141
147
- (defcustom lsp-zig-zls- prefer-ast-check-as-child-process t
142
+ (defcustom lsp-zig-prefer-ast-check-as-child-process t
148
143
" Favor using `zig ast-check` instead of ZLS's fork."
149
144
:group 'lsp-zig
150
145
:type 'boolean )
151
146
152
- (defcustom lsp-zig-zls- record-session nil
147
+ (defcustom lsp-zig-record-session nil
153
148
" When true, zls will record all request is receives and write in into
154
149
`record_session_path`, so that they can replayed with `zls replay`."
155
150
:group 'lsp-zig
156
151
:type 'boolean )
157
152
158
- (defcustom lsp-zig-zls- record-session-path " "
153
+ (defcustom lsp-zig-record-session-path " "
159
154
" Output file path when `record_session` is set.
160
155
The recommended file extension *.zlsreplay."
161
156
:group 'lsp-zig
162
157
:type 'string )
163
158
164
- (defcustom lsp-zig-zls- replay-session-path " "
159
+ (defcustom lsp-zig-replay-session-path " "
165
160
" Used when calling `zls replay` for specifying the replay file.
166
161
If no extra argument is given `record_session_path` is used as the default path."
167
162
:group 'lsp-zig
168
163
:type 'string )
169
164
170
- (defcustom lsp-zig-zls- builtin-path " "
165
+ (defcustom lsp-zig-builtin-path " "
171
166
" Path to `builtin' ; useful for debugging, automatically set if let null."
172
167
:group 'lsp-zig
173
168
:type 'string )
174
169
175
- (defcustom lsp-zig-zls- zig-lib-path " "
170
+ (defcustom lsp-zig-zig-lib-path " "
176
171
" Zig library path.
177
172
e.g. `/path/to/zig/lib/zig`, used to analyze std library imports."
178
173
:group 'lsp-zig
179
174
:type 'string )
180
175
181
- (defcustom lsp-zig-zls- build-runner-path " "
176
+ (defcustom lsp-zig-build-runner-path " "
182
177
" Path to the `build_runner.zig` file provided by zls.
183
178
null is equivalent to `${executable_directory}/build_runner.zig`."
184
179
:group 'lsp-zig
185
180
:type 'string )
186
181
187
- (defcustom lsp-zig-zls- global-cache-path " "
182
+ (defcustom lsp-zig-global-cache-path " "
188
183
" Path to a directory that will be used as zig's cache.
189
184
null is equivalent to `${KnownFolders.Cache}/zls`."
190
185
:group 'lsp-zig
191
186
:type 'string )
192
187
193
- (defcustom lsp-zig-zls- build-runner-global-cache-path " "
188
+ (defcustom lsp-zig-build-runner-global-cache-path " "
194
189
" Path to a directory that will be used as the global cache path when executing
195
190
a projects build.zig. null is equivalent to the path shown by `zig env`."
196
191
:group 'lsp-zig
197
192
:type 'string )
198
193
199
- (defcustom lsp-zig-zls- completions-with-replace nil
194
+ (defcustom lsp-zig-completions-with-replace nil
200
195
" Completions confirm behavior.
201
196
If `true' , replace the text after the cursor."
202
197
:group 'lsp-zig
203
198
:type 'boolean )
204
199
205
- (defcustom lsp-zig-zls-completion-label-details nil
206
- " When false, the function signature of completion results is hidden.
207
- Improves readability in some editors."
208
- :group 'lsp-zig
209
- :type 'boolean )
210
-
211
200
; ;
212
201
; ;; Util
213
202
@@ -294,37 +283,35 @@ and not the global storage."
294
283
; ;; Core
295
284
296
285
(lsp-register-custom-settings
297
- '((" zig.zls.trace.server" lsp-zig-trace-server)
298
- (" zig.zls.checkForUpdate" lsp-zig-check-for-update)
299
- (" zig.zls.path" lsp-zig-zls-executable)
300
- (" zig.zls.enableSnippets" lsp-zig-zls-enable-snippets)
301
- (" zig.zls.enableArgumentPlaceholders" lsp-zig-zls-enable-argument-placeholders)
302
- (" zig.zls.enableBuildOnSave" lsp-zig-zls-enable-build-on-save)
303
- (" zig.zls.buildOnSaveStep" lsp-zig-zls-build-on-save-step)
304
- (" zig.zls.enableAutofix" lsp-zig-zls-enable-autofix)
305
- (" zig.zls.semanticTokens" lsp-zig-zls-semantic-tokens)
306
- (" zig.zls.enableInlayHints" lsp-zig-zls-enable-inlay-hints)
307
- (" zig.zls.inlayHintsShowVariableTypeHints" lsp-zig-zls-inlay-hints-show-variable-type-hints)
308
- (" zig.zls.inlayHintsShowParameterName" lsp-zig-zls-inlay-hints-show-parameter-name)
309
- (" zig.zls.inlayHintsShowBuiltin" lsp-zig-zls-inlay-hints-show-builtin)
310
- (" zig.zls.inlayHintsExcludeSingleArgument" lsp-zig-zls-inlay-hints-exclude-single-argument)
311
- (" zig.zls.inlayHintsHideRedundantParamNames" lsp-zig-zls-inlay-hints-hide-redundant-param-names)
312
- (" zig.zls.inlayHintsHideRedundantParamNamesLastToken" lsp-zig-zls-inlay-hints-hide-redundant-param-names-last-token)
313
- (" zig.zls.warnStyle" lsp-zig-zls-warn-style)
314
- (" zig.zls.highlightGlobalVarDeclarations" lsp-zig-zls-highlight-global-var-declarations)
315
- (" zig.zls.dangerousComptimeExperimentsDoNotEnable" lsp-zig-zls-dangerous-comptime-experiments-do-not-enable)
316
- (" zig.zls.skipStdReferences" lsp-zig-zls-skip-std-references)
317
- (" zig.zls.preferAstCheckAsChildProcess" lsp-zig-zls-prefer-ast-check-as-child-process)
318
- (" zig.zls.recordSession" lsp-zig-zls-record-session)
319
- (" zig.zls.recordSessionPath" lsp-zig-zls-record-session-path)
320
- (" zig.zls.replaySessionPath" lsp-zig-zls-replay-session-path)
321
- (" zig.zls.builtinPath" lsp-zig-zls-builtin-path)
322
- (" zig.zls.zigLibPath" lsp-zig-zls-zig-lib-path)
323
- (" zig.zls.buildRunnerPath" lsp-zig-zls-build-runner-path)
324
- (" zig.zls.globalCachePath" lsp-zig-zls-global-cache-path)
325
- (" zig.zls.buildRunnerGlobalCachePath" lsp-zig-zls-build-runner-global-cache-path)
326
- (" zig.zls.completionsWithReplace" lsp-zig-zls-completions-with-replace)
327
- (" zig.zls.completionLabelDetails" lsp-zig-zls-completion-label-details)))
286
+ '((" zls.trace.server" lsp-zig-trace-server)
287
+ (" zls.path" lsp-zig-zls-executable)
288
+ (" zls.enable_snippets" lsp-zls-enable-snippets t )
289
+ (" zls.enable_argument_placeholders" lsp-zig-enable-argument-placeholders t )
290
+ (" zls.enable_build_on_save" lsp-zig-enable-build-on-save t )
291
+ (" zls.build_on_save_step" lsp-zig-build-on-save-step)
292
+ (" zls.enable_autofix" lsp-zig-enable-autofix t )
293
+ (" zls.semantic_tokens" lsp-zig-semantic-tokens)
294
+ (" zls.enable_inlay_hints" lsp-zig-enable-inlay-hints t )
295
+ (" zls.inlay_hints_show_variable_type_hints" lsp-zig-inlay-hints-show-variable-type-hints t )
296
+ (" zls.inlay_hints_show_parameter_name" lsp-zig-inlay-hints-show-parameter-name t )
297
+ (" zls.inlay_hints_show_builtin" lsp-zig-inlay-hints-show-builtin t )
298
+ (" zls.inlay_hints_exclude_single_argument" lsp-zig-inlay-hints-exclude-single-argument t )
299
+ (" zls.inlay_hints_hide_redundant_param_names" lsp-zig-inlay-hints-hide-redundant-param-names t )
300
+ (" zls.inlay_hints_hide_redundant_param_names_last_token" lsp-zig-inlay-hints-hide-redundant-param-names-last-token t )
301
+ (" zls.warn_style" lsp-zig-warn-style t )
302
+ (" zls.highlight_global_var_declarations" lsp-zig-highlight-global-var-declarations t )
303
+ (" zls.dangerous_comptime_experiments_do_not_enable" lsp-zig-dangerous-comptime-experiments-do-not-enable t )
304
+ (" zls.skip_std_references" lsp-zig-skip-std-references t )
305
+ (" zls.prefer_ast_check_as_child_process" lsp-zig-prefer-ast-check-as-child-process t )
306
+ (" zls.record_session" lsp-zig-record-session t )
307
+ (" zls.record_session_path" lsp-zig-record-session-path)
308
+ (" zls.replay_session_path" lsp-zig-replay-session-path)
309
+ (" zls.builtin_path" lsp-zig-builtin-path)
310
+ (" zls.zig_lib_path" lsp-zig-zig-lib-path)
311
+ (" zls.build_runner_path" lsp-zig-build-runner-path)
312
+ (" zls.global_cache_path" lsp-zig-global-cache-path)
313
+ (" zls.build_runner_global_cache_path" lsp-zig-build-runner-global-cache-path)
314
+ (" zls.completion_label_details" lsp-zig-completions-with-replace t )))
328
315
329
316
(lsp-register-client
330
317
(make-lsp-client
0 commit comments