mirror of
https://github.com/golang/go
synced 2024-11-18 21:54:49 -07:00
dab579b762
CL 193726 accidentally turned off deep completions and fuzzy matching by default. Re-enabling them now. Change-Id: Ia120766b3a72243efe9c398c0efd6d1a101d0e7f Reviewed-on: https://go-review.googlesource.com/c/tools/+/194020 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
80 lines
2.0 KiB
Go
80 lines
2.0 KiB
Go
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package source
|
|
|
|
import "golang.org/x/tools/internal/lsp/protocol"
|
|
|
|
var (
|
|
DefaultSessionOptions = SessionOptions{
|
|
TextDocumentSyncKind: protocol.Incremental,
|
|
HoverKind: SynopsisDocumentation,
|
|
InsertTextFormat: protocol.PlainTextTextFormat,
|
|
SupportedCodeActions: map[FileKind]map[protocol.CodeActionKind]bool{
|
|
Go: {
|
|
protocol.SourceOrganizeImports: true,
|
|
protocol.QuickFix: true,
|
|
},
|
|
Mod: {},
|
|
Sum: {},
|
|
},
|
|
Completion: CompletionOptions{
|
|
Documentation: true,
|
|
Deep: true,
|
|
FuzzyMatching: true,
|
|
},
|
|
}
|
|
DefaultViewOptions = ViewOptions{}
|
|
)
|
|
|
|
type SessionOptions struct {
|
|
Env []string
|
|
BuildFlags []string
|
|
UsePlaceholders bool
|
|
HoverKind HoverKind
|
|
SuggestedFixes bool
|
|
DisabledAnalyses map[string]struct{}
|
|
|
|
WatchFileChanges bool
|
|
InsertTextFormat protocol.InsertTextFormat
|
|
ConfigurationSupported bool
|
|
DynamicConfigurationSupported bool
|
|
DynamicWatchedFilesSupported bool
|
|
PreferredContentFormat protocol.MarkupKind
|
|
LineFoldingOnly bool
|
|
|
|
SupportedCodeActions map[FileKind]map[protocol.CodeActionKind]bool
|
|
|
|
TextDocumentSyncKind protocol.TextDocumentSyncKind
|
|
|
|
Completion CompletionOptions
|
|
}
|
|
|
|
type ViewOptions struct {
|
|
}
|
|
|
|
type CompletionOptions struct {
|
|
Deep bool
|
|
FuzzyMatching bool
|
|
Unimported bool
|
|
Documentation bool
|
|
FullDocumentation bool
|
|
}
|
|
|
|
type HoverKind int
|
|
|
|
const (
|
|
SingleLine = HoverKind(iota)
|
|
NoDocumentation
|
|
SynopsisDocumentation
|
|
FullDocumentation
|
|
|
|
// structured is an experimental setting that returns a structured hover format.
|
|
// This format separates the signature from the documentation, so that the client
|
|
// can do more manipulation of these fields.
|
|
//
|
|
// This should only be used by clients that support this behavior.
|
|
Structured
|
|
)
|