Versions in this module Expand all Collapse all v0 v0.4.5 Sep 2, 2020 Changes in this version + const Analysis + const BREAK + const CASE + const CHAN + const CONST + const CONTINUE + const CaseInsensitive + const CaseSensitive + const Change + const Close + const Create + const DEFAULT + const DEFER + const Delete + const DynamicSymbols + const ELSE + const FALLTHROUGH + const FOR + const FUNC + const FullDocumentation + const FullyQualifiedSymbols + const Fuzzy + const GO + const GOTO + const Go + const GoModTidy + const IF + const IMPORT + const INTERFACE + const InvalidateMetadata + const ListError + const MAP + const MaxDeepCompletions + const Mod + const ModTidyError + const NoDocumentation + const Open + const OptionDeprecated + const OptionHandled + const OptionUnexpected + const PACKAGE + const PackageQualifiedSymbols + const ParseError + const RANGE + const RETURN + const SELECT + const STRUCT + const SWITCH + const Save + const SingleLine + const Structured + const Sum + const SymbolCaseInsensitive + const SymbolCaseSensitive + const SymbolFuzzy + const SynopsisDocumentation + const TYPE + const TypeError + const UnknownError + const UnknownFileAction + const UnknownKind + const VAR + var CommandExtractFunction = &Command + var CommandExtractVariable = &Command + var CommandFillStruct = &Command + var CommandGenerate = &Command + var CommandRegenerateCgo = &Command + var CommandTest = &Command + var CommandTidy = &Command + var CommandToggleDetails = &Command + var CommandUndeclaredName = &Command + var CommandUpgradeDependency = &Command + var CommandVendor = &Command + var Commands = []*Command + var ErrNoIdentFound = errors.New("no identifier found") + var ErrNotAType = errors.New("not a type name or method") + var ErrTmpModfileUnsupported = errors.New("-modfile is unsupported for this Go version") + var InconsistentVendoring = errors.New("inconsistent vendoring") + var PackagesLoadError = errors.New("packages.Load error") + func CommentToMarkdown(text string) string + func CompareDiagnostic(a, b *Diagnostic) int + func Completion(ctx context.Context, snapshot Snapshot, fh FileHandle, ...) ([]CompletionItem, *Selection, error) + func Diagnostics(ctx context.Context, snapshot Snapshot, pkg Package, withAnalysis bool) (map[VersionedFileIdentity][]*Diagnostic, bool, error) + func DocumentSymbols(ctx context.Context, snapshot Snapshot, fh FileHandle) ([]protocol.DocumentSymbol, error) + func FileDiagnostics(ctx context.Context, snapshot Snapshot, uri span.URI) (VersionedFileIdentity, []*Diagnostic, error) + func Format(ctx context.Context, snapshot Snapshot, fh FileHandle) ([]protocol.TextEdit, error) + func FormatHover(h *HoverInformation, options Options) (string, error) + func FromProtocolEdits(m *protocol.ColumnMapper, edits []protocol.TextEdit) ([]diff.TextEdit, error) + func GCOptimizationDetails(ctx context.Context, snapshot Snapshot, pkgDir span.URI) (map[VersionedFileIdentity][]*Diagnostic, error) + func Highlight(ctx context.Context, snapshot Snapshot, fh FileHandle, pos protocol.Position) ([]protocol.Range, error) + func Hover(ctx context.Context, snapshot Snapshot, fh FileHandle, ...) (*protocol.Hover, error) + func Implementation(ctx context.Context, snapshot Snapshot, f FileHandle, pp protocol.Position) ([]protocol.Location, error) + func IncomingCalls(ctx context.Context, snapshot Snapshot, fh FileHandle, pos protocol.Position) ([]protocol.CallHierarchyIncomingCall, error) + func IsGenerated(ctx context.Context, snapshot Snapshot, uri span.URI) bool + func LensFuncs() map[string]LensFunc + func MarshalArgs(args ...interface{}) ([]json.RawMessage, error) + func OutgoingCalls(ctx context.Context, snapshot Snapshot, fh FileHandle, pos protocol.Position) ([]protocol.CallHierarchyOutgoingCall, error) + func PrepareCallHierarchy(ctx context.Context, snapshot Snapshot, fh FileHandle, pos protocol.Position) ([]protocol.CallHierarchyItem, error) + func Rename(ctx context.Context, s Snapshot, f FileHandle, pp protocol.Position, ...) (map[span.URI][]protocol.TextEdit, error) + func SignatureHelp(ctx context.Context, snapshot Snapshot, fh FileHandle, pos protocol.Position) (*protocol.SignatureInformation, int, error) + func SortDiagnostics(d []*Diagnostic) + func ToProtocolEdits(m *protocol.ColumnMapper, edits []diff.TextEdit) ([]protocol.TextEdit, error) + func UnmarshalArgs(jsonArgs []json.RawMessage, args ...interface{}) error + func WorkspaceSymbols(ctx context.Context, matcherType SymbolMatcher, style SymbolStyle, ...) ([]protocol.SymbolInformation, error) + type Analyzer struct + Analyzer *analysis.Analyzer + Command *Command + FixesError func(msg string) bool + HighConfidence bool + func EnabledAnalyzers(snapshot Snapshot) (analyzers []Analyzer) + func (a Analyzer) Enabled(view View) bool + type AppliesFunc func(fset *token.FileSet, rng span.Range, src []byte, file *ast.File, ...) bool + type BuiltinPackage struct + Package *ast.Package + ParsedFile *ParsedGoFile + type ClientOptions struct + ConfigurationSupported bool + DynamicConfigurationSupported bool + DynamicWatchedFilesSupported bool + HierarchicalDocumentSymbolSupport bool + InsertTextFormat protocol.InsertTextFormat + LineFoldingOnly bool + PreferredContentFormat protocol.MarkupKind + type Command struct + Name string + Title string + func (c *Command) Applies(ctx context.Context, snapshot Snapshot, fh FileHandle, pRng protocol.Range) bool + func (c *Command) IsSuggestedFix() bool + func (c *Command) SuggestedFix(ctx context.Context, snapshot Snapshot, fh VersionedFileHandle, ...) ([]protocol.TextDocumentEdit, error) + type CompletionItem struct + AdditionalTextEdits []protocol.TextEdit + Depth int + Detail string + Documentation string + InsertText string + Kind protocol.CompletionItemKind + Label string + Score float64 + func (i *CompletionItem) Snippet() string + type DebuggingOptions struct + CompletionBudget time.Duration + LiteralCompletions bool + VerboseOutput bool + type Declaration struct + MappedRange []mappedRange + type Diagnostic struct + Message string + Range protocol.Range + Related []RelatedInformation + Severity protocol.DiagnosticSeverity + Source string + Tags []protocol.DiagnosticTag + type ErrIsDefinition struct + func (e ErrIsDefinition) Error() string + type Error struct + Category string + Kind ErrorKind + Message string + Range protocol.Range + Related []RelatedInformation + SuggestedFixes []SuggestedFix + URI span.URI + func (e *Error) Error() string + type ErrorKind int + type ExperimentalOptions struct + Annotations map[string]bool + TempModfile bool + VerboseWorkDoneProgress bool + type FileAction int + func (a FileAction) String() string + type FileHandle interface + FileIdentity func() FileIdentity + Kind func() FileKind + Read func() ([]byte, error) + URI func() span.URI + type FileIdentity struct + Hash string + Kind FileKind + URI span.URI + type FileKind int + func DetectLanguage(langID, filename string) FileKind + func (k FileKind) String() string + type FileModification struct + Action FileAction + LanguageID string + OnDisk bool + Text []byte + URI span.URI + Version float64 + type FoldingRangeInfo struct + Kind protocol.FoldingRangeKind + func FoldingRange(ctx context.Context, snapshot Snapshot, fh FileHandle, lineFoldingOnly bool) (ranges []*FoldingRangeInfo, err error) + func (s FoldingRangeInfo) Range() (protocol.Range, error) + func (s FoldingRangeInfo) Span() (span.Span, error) + func (s FoldingRangeInfo) URI() span.URI + type Hooks struct + ComputeEdits diff.ComputeEdits + ConvenienceAnalyzers map[string]Analyzer + DefaultAnalyzers map[string]Analyzer + GoDiff bool + GofumptFormat func(ctx context.Context, src []byte) ([]byte, error) + TypeErrorAnalyzers map[string]Analyzer + URLRegexp *regexp.Regexp + type HoverInformation struct + FullDocumentation string + ImportPath string + Link string + Signature string + SingleLine string + SymbolName string + Synopsis string + func HoverIdentifier(ctx context.Context, i *IdentifierInfo) (*HoverInformation, error) + type HoverKind int + type IdentifierInfo struct + Declaration Declaration + Name string + Snapshot Snapshot + Type struct{ ... } + func Identifier(ctx context.Context, snapshot Snapshot, fh FileHandle, pos protocol.Position) (*IdentifierInfo, error) + func (s IdentifierInfo) Range() (protocol.Range, error) + func (s IdentifierInfo) Span() (span.Span, error) + func (s IdentifierInfo) URI() span.URI + type ImportFix struct + Edits []protocol.TextEdit + Fix *imports.ImportFix + func AllImportsFixes(ctx context.Context, snapshot Snapshot, fh FileHandle) (allFixEdits []protocol.TextEdit, editsPerFix []*ImportFix, err error) + type ImportShortcut int + const Both + const Definition + const Link + func (s ImportShortcut) ShowDefinition() bool + func (s ImportShortcut) ShowLinks() bool + type LensFunc func(context.Context, Snapshot, FileHandle) ([]protocol.CodeLens, error) + type LinkTarget string + type Matcher int + type OptionResult struct + Error error + Name string + Replacement string + State OptionState + Value interface{} + type OptionResults []OptionResult + func SetOptions(options *Options, opts interface{}) OptionResults + type OptionState int + type Options struct + func DefaultOptions() Options + func (o *Options) ForClientCapabilities(caps protocol.ClientCapabilities) + func (o Options) AddDefaultAnalyzer(a *analysis.Analyzer) + type Overlay interface + Saved func() bool + type Package interface + CompiledGoFiles func() []*ParsedGoFile + File func(uri span.URI) (*ParsedGoFile, error) + ForTest func() string + GetErrors func() []*Error + GetImport func(pkgPath string) (Package, error) + GetSyntax func() []*ast.File + GetTypes func() *types.Package + GetTypesInfo func() *types.Info + GetTypesSizes func() types.Sizes + ID func() string + Imports func() []Package + IsIllTyped func() bool + MissingDependencies func() []string + Module func() *packages.Module + Name func() string + PkgPath func() string + func NarrowestPackage(pkgs []Package) (Package, error) + func WidestPackage(pkgs []Package) (Package, error) + type PackagePolicy func([]Package) (Package, error) + type ParseMode int + const ParseExported + const ParseFull + const ParseHeader + type ParsedGoFile struct + File *ast.File + Mapper *protocol.ColumnMapper + Mode ParseMode + ParseErr error + Src []byte + Tok *token.File + URI span.URI + type ParsedModule struct + File *modfile.File + Mapper *protocol.ColumnMapper + ParseErrors []Error + type PrepareItem struct + Range protocol.Range + Text string + func PrepareRename(ctx context.Context, snapshot Snapshot, f FileHandle, pp protocol.Position) (*PrepareItem, error) + type ReferenceInfo struct + Name string + func References(ctx context.Context, s Snapshot, f FileHandle, pp protocol.Position, ...) ([]*ReferenceInfo, error) + func (s ReferenceInfo) Range() (protocol.Range, error) + func (s ReferenceInfo) Span() (span.Span, error) + func (s ReferenceInfo) URI() span.URI + type RelatedInformation struct + Message string + Range protocol.Range + URI span.URI + type Selection struct + func (p Selection) Content() string + func (p Selection) Prefix() string + func (p Selection) Suffix() string + func (s Selection) Range() (protocol.Range, error) + func (s Selection) Span() (span.Span, error) + func (s Selection) URI() span.URI + type ServerOptions struct + SupportedCodeActions map[FileKind]map[protocol.CodeActionKind]bool + SupportedCommands []string + type Session interface + Cache func() interface{} + DidModifyFiles func(ctx context.Context, changes []FileModification) ([]Snapshot, []func(), []span.URI, error) + GetFile func(ctx context.Context, uri span.URI) (FileHandle, error) + NewView func(ctx context.Context, name string, folder span.URI, options Options) (View, Snapshot, func(), error) + Options func() Options + Overlays func() []Overlay + SetOptions func(Options) + Shutdown func(ctx context.Context) + View func(name string) View + ViewOf func(uri span.URI) (View, error) + Views func() []View + type Snapshot interface + Analyze func(ctx context.Context, pkgID string, analyzers ...*analysis.Analyzer) ([]*Error, error) + BuiltinPackage func(ctx context.Context) (*BuiltinPackage, error) + CachedImportPaths func(ctx context.Context) (map[string]Package, error) + FileSet func() *token.FileSet + FindFile func(uri span.URI) VersionedFileHandle + GetFile func(ctx context.Context, uri span.URI) (VersionedFileHandle, error) + GetReverseDependencies func(ctx context.Context, id string) ([]Package, error) + ID func() uint64 + IsOpen func(uri span.URI) bool + IsSaved func(uri span.URI) bool + KnownPackages func(ctx context.Context) ([]Package, error) + ModTidy func(ctx context.Context, fh FileHandle) (*TidiedModule, error) + ModUpgrade func(ctx context.Context, fh FileHandle) (map[string]string, error) + ModWhy func(ctx context.Context, fh FileHandle) (map[string]string, error) + PackagesForFile func(ctx context.Context, uri span.URI, mode TypecheckMode) ([]Package, error) + ParseGo func(ctx context.Context, fh FileHandle, mode ParseMode) (*ParsedGoFile, error) + ParseMod func(ctx context.Context, fh FileHandle) (*ParsedModule, error) + PosToDecl func(ctx context.Context, pgf *ParsedGoFile) (map[token.Pos]ast.Decl, error) + PosToField func(ctx context.Context, pgf *ParsedGoFile) (map[token.Pos]*ast.Field, error) + RunGoCommand func(ctx context.Context, verb string, args []string) (*bytes.Buffer, error) + RunGoCommandDirect func(ctx context.Context, verb string, args []string) error + RunGoCommandPiped func(ctx context.Context, verb string, args []string, stdout, stderr io.Writer) error + View func() View + WorkspaceDirectories func(ctx context.Context) []span.URI + WorkspacePackages func(ctx context.Context) ([]Package, error) + type SuggestedFix struct + Edits map[span.URI][]protocol.TextEdit + Title string + type SuggestedFixFunc func(fset *token.FileSet, rng span.Range, src []byte, file *ast.File, ...) (*analysis.SuggestedFix, error) + type SymbolMatcher int + type SymbolStyle int + type TidiedModule struct + Errors []Error + Parsed *ParsedModule + TidiedContent []byte + type TypecheckMode int + const TypecheckAll + const TypecheckFull + const TypecheckUnknown + const TypecheckWorkspace + type UserOptions struct + BuildFlags []string + CompletionDocumentation bool + DeepCompletion bool + EnabledCodeLens map[string]bool + Env []string + ExpandWorkspaceToModule bool + Gofumpt bool + HoverKind HoverKind + ImportShortcut ImportShortcut + LinkTarget string + LinksInHover bool + LocalPrefix string + Matcher Matcher + Placeholders bool + StaticCheck bool + SymbolMatcher SymbolMatcher + SymbolStyle SymbolStyle + UnimportedCompletion bool + UserEnabledAnalyses map[string]bool + type VersionedFileHandle interface + Session func() string + Version func() float64 + VersionedFileIdentity func() VersionedFileIdentity + type VersionedFileIdentity struct + SessionID string + URI span.URI + Version float64 + type View interface + AwaitInitialized func(ctx context.Context) + BackgroundContext func() context.Context + Folder func() span.URI + IgnoredFile func(uri span.URI) bool + IsGoPrivatePath func(path string) bool + ModFile func() span.URI + Name func() string + Options func() Options + Rebuild func(ctx context.Context) (Snapshot, func(), error) + RunProcessEnvFunc func(ctx context.Context, fn func(*imports.Options) error) error + Session func() Session + SetOptions func(context.Context, Options) (View, error) + Shutdown func(ctx context.Context) + Snapshot func(ctx context.Context) (Snapshot, func()) + ValidBuildConfiguration func() bool + WriteEnv func(ctx context.Context, w io.Writer) error