@@ -72,7 +72,7 @@ completing function calls."
72
72
(defcustom lsp-go-build-flags []
73
73
" A vector of flags passed on to the build system when invoked,
74
74
applied to queries like `go list'."
75
- :type 'lsp-string -vector
75
+ :type '( lsp-repeatable -vector string)
76
76
:group 'lsp-go
77
77
:risky t
78
78
:package-version '(lsp-mode " 6.2" ))
@@ -188,11 +188,11 @@ The codelenses can be found at https://github.com/golang/tools/blob/3fa0e8f87c1a
188
188
'lsp-go-library-directories
189
189
" lsp-mode 7.0.1" )
190
190
191
- (defcustom lsp-go-library-directories '( " /usr" )
191
+ (defcustom lsp-go-library-directories [ " /usr" ]
192
192
" List of directories which will be considered to be libraries."
193
193
:group 'lsp-go
194
194
:risky t
195
- :type '(repeat string))
195
+ :type '(lsp-repeatable-vector string))
196
196
197
197
(define-obsolete-variable-alias
198
198
'lsp-clients-go-library-directories-include-go-modules
@@ -231,6 +231,7 @@ $GOPATH/pkg/mod along with the value of
231
231
(defcustom lsp-go-link-target " pkg.go.dev"
232
232
" Which website to use for displaying Go documentation."
233
233
:type '(choice (const " pkg.go.dev" )
234
+ (const " godoc.org" )
234
235
(string :tag " A custom website" ))
235
236
:group 'lsp-go
236
237
:package-version '(lsp-mode " 7.0.1" ))
@@ -275,9 +276,10 @@ $GOPATH/pkg/mod along with the value of
275
276
:risky t
276
277
:package-version '(lsp-mode " 8.0.0" ))
277
278
278
- (defcustom lsp-go-symbol-matcher " Fuzzy "
279
+ (defcustom lsp-go-symbol-matcher " FastFuzzy "
279
280
" Sets the algorithm that is used when finding workspace symbols."
280
281
:type '(choice (const " Fuzzy" )
282
+ (const " FastFuzzy" )
281
283
(const " CaseInsensitive" )
282
284
(const " CaseSensitive" ))
283
285
:group 'lsp-go
@@ -301,21 +303,105 @@ $GOPATH/pkg/mod along with the value of
301
303
:risky t
302
304
:package-version '(lsp-mode " 8.0.0" ))
303
305
306
+ (defcustom lsp-go-template-extensions []
307
+ " The extensions of file names that are treated as template files.
308
+
309
+ The extension is the part of the file name after the final dot."
310
+ :type '(lsp-repeatable-vector string)
311
+ :group 'lsp-go
312
+ :package-version '(lsp-mode " 9.1" ))
313
+
314
+ (defcustom lsp-go-standalone-tags [" ignore" ]
315
+ " Specifies a set of build constraints that identify individual Go
316
+ source files that make up the entire main package of an
317
+ executable."
318
+ :type '(lsp-repeatable-vector string)
319
+ :group 'lsp-go
320
+ :package-version '(lsp-mode " 9.1" ))
321
+
322
+ (defcustom lsp-go-completion-budget " 100ms"
323
+ " Soft latency goal for completion requests"
324
+ :type 'string
325
+ :group 'lsp-go
326
+ :package-version '(lsp-mode " 9.1" ))
327
+
328
+ (defcustom lsp-go-matcher " Fuzzy"
329
+ " Sets the algorithm that is used when calculating completion candidates."
330
+ :type '(choice (const " CaseInsensitive" )
331
+ (const " CaseSensitive" )
332
+ (const " Fuzzy" ))
333
+ :group 'lsp-go
334
+ :package-version '(lsp-mode " 9.1" ))
335
+
336
+ (defcustom lsp-go-complete-function-calls t
337
+ " Enables function call completion.
338
+
339
+ When completing a statement, or when a function return type
340
+ matches the expected of the expression being completed,
341
+ completion may suggest call expressions."
342
+ :type 'boolean
343
+ :group 'lsp-go
344
+ :package-version '(lsp-mode " 9.1" ))
345
+
346
+ (defcustom lsp-go-diagnostics-delay " 1s"
347
+ " Controls the amount of time that gopls waits after the most
348
+ recent file modification before computing deep diagnostics."
349
+ :type 'string
350
+ :group 'lsp-go
351
+ :package-version '(lsp-mode " 9.1" ))
352
+
353
+ (defcustom lsp-go-analysis-progress-reporting t
354
+ " Controls whether gopls sends progress notifications when
355
+ construction of its index of analysis facts is taking a long
356
+ time."
357
+ :type 'boolean
358
+ :group 'lsp-go
359
+ :package-version '(lsp-mode " 9.1" ))
360
+
361
+ (defcustom lsp-go-symbol-scope " all"
362
+ " Controls which packages are searched for workspace/symbol
363
+ requests.
364
+
365
+ When the scope is \" workspace\" , gopls searches only workspace
366
+ packages.
367
+
368
+ When the scope is \" all\" , gopls searches all loaded packages,
369
+ including dependencies and the standard library."
370
+ :type '(choice (const " all" )
371
+ (const " workspace" ))
372
+ :group 'lsp-go
373
+ :package-version '(lsp-mode " 9.1" ))
374
+
375
+ (defcustom lsp-go-verbose-output t
376
+ " Enables additional debug logging."
377
+ :type 'boolean
378
+ :group 'lsp-go
379
+ :package-version '(lsp-mode " 9.1" ))
380
+
304
381
(lsp-register-custom-settings
305
- '((" gopls.usePlaceholders " lsp-go-use-placeholders t )
306
- (" gopls.hoverKind " lsp-go-hover-kind )
382
+ '((" gopls.analyses " lsp-go-analyses )
383
+ (" gopls.analysisProgressReporting " lsp-go-analysis-progress-reporting t )
307
384
(" gopls.buildFlags" lsp-go-build-flags)
385
+ (" gopls.codelenses" lsp-go-codelenses)
386
+ (" gopls.completeFunctionCalls" lsp-go-complete-function-calls t )
387
+ (" gopls.completionBudget" lsp-go-completion-budget)
388
+ (" gopls.diagnosticsDelay" lsp-go-diagnostics-delay)
389
+ (" gopls.directoryFilters" lsp-go-directory-filters)
308
390
(" gopls.env" lsp-go-env)
391
+ (" gopls.gofumpt" lsp-go-use-gofumpt t )
392
+ (" gopls.hoverKind" lsp-go-hover-kind)
393
+ (" gopls.importShortcut" lsp-go-import-shortcut)
309
394
(" gopls.linkTarget" lsp-go-link-target)
310
- (" gopls.codelenses" lsp-go-codelenses)
311
395
(" gopls.linksInHover" lsp-go-links-in-hover t )
312
- (" gopls.gofumpt" lsp-go-use-gofumpt t )
313
396
(" gopls.local" lsp-go-goimports-local)
314
- (" gopls.directoryFilters" lsp-go-directory-filters)
315
- (" gopls.analyses" lsp-go-analyses)
316
- (" gopls.importShortcut" lsp-go-import-shortcut)
397
+ (" gopls.matcher" lsp-go-matcher)
398
+ (" gopls.standaloneTags" lsp-go-standalone-tags)
317
399
(" gopls.symbolMatcher" lsp-go-symbol-matcher)
318
- (" gopls.symbolStyle" lsp-go-symbol-style)))
400
+ (" gopls.symbolScope" lsp-go-symbol-scope)
401
+ (" gopls.symbolStyle" lsp-go-symbol-style)
402
+ (" gopls.templateExtensions" lsp-go-template-extensions)
403
+ (" gopls.usePlaceholders" lsp-go-use-placeholders t )
404
+ (" gopls.verboseOutput" lsp-go-verbose-output t )))
319
405
320
406
(defcustom lsp-go-server-wrapper-function
321
407
#'identity
0 commit comments