lsp

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDocumentAlreadyOpen           = errors.New("document is already open")
	ErrDocumentNotOpen               = errors.New("document is not open")
	ErrDocumentVersionNotIncreasing  = errors.New("document version is not increasing")
	ErrIncrementalChangesUnsupported = errors.New("incremental document changes are not supported")
)
View Source
var ErrExitWithoutShutdown = errors.New("LSP client exited without shutdown")

Functions

func FilePath

func FilePath(uri string) (string, error)

func FileURI

func FileURI(path string) string

Types

type AnalysisSnapshot

type AnalysisSnapshot struct {
	Document Document
	Root     string

	Module *goxcompiler.Module
	Err    error

	LastGood        *goxcompiler.Module
	LastGoodVersion int

	Dependencies []goxcompiler.SemanticDependency
	// contains filtered or unexported fields
}

AnalysisSnapshot is the immutable semantic analysis owned by one editor document version. Consumers must reuse Module instead of reparsing the same URI/version independently. LastGood deliberately survives a syntactically invalid edit so later phases can use it as a controlled fallback without making stale data the authority for the current version.

type AnalysisStore

type AnalysisStore struct {
	// contains filtered or unexported fields
}

AnalysisStore owns canonical analyses for open document versions. Expensive builds happen outside the store lock: equal URI/version requests coalesce on one in-flight build while unrelated documents may analyze concurrently. Invalidations advance a generation so a build that finishes after its input became stale can never repopulate the cache.

func NewAnalysisStore

func NewAnalysisStore() *AnalysisStore

func (*AnalysisStore) Close

func (s *AnalysisStore) Close(uri string)

func (*AnalysisStore) Current

func (s *AnalysisStore) Current(uri string) (*AnalysisSnapshot, bool)

func (*AnalysisStore) InvalidateAll

func (s *AnalysisStore) InvalidateAll()

func (*AnalysisStore) InvalidateDependencyPath

func (s *AnalysisStore) InvalidateDependencyPath(path string) []string

InvalidateDependencyPath removes open snapshots whose semantic dependency graph reaches the changed .gox path. Reverse edges make this lookup proportional to the affected documents rather than the whole workspace.

func (*AnalysisStore) InvalidateDependencyPathExcept

func (s *AnalysisStore) InvalidateDependencyPathExcept(path, exceptURI string) []string

InvalidateDependencyPathExcept is used when an open document changes. Its dependents become stale, but the changed document keeps its previous LastGood until the new version has been analyzed.

func (*AnalysisStore) InvalidateGoPackages

func (s *AnalysisStore) InvalidateGoPackages(root string, packagePaths []string) []string

goPackageDependentURIs returns the open snapshots in root that currently depend on any of packagePaths. C2a deliberately exposes this lookup without changing invalidation behavior; the next phase can consume the same index. InvalidateGoPackages removes only snapshots whose recorded semantic Go package dependencies intersect packagePaths. The semantic importer itself is still one canonical go/types universe per root, so every production .go change rotates that root-wide universe even when unrelated immutable snapshots remain cached.

func (*AnalysisStore) InvalidateRoot

func (s *AnalysisStore) InvalidateRoot(root string) []string

InvalidateRoot drops semantic state belonging to one project root while preserving warm analyses and Go package identities for unrelated workspace folders. It is used for module-metadata changes and conservative fallbacks; ordinary production .go changes use InvalidateGoPackages.

func (*AnalysisStore) InvalidateURI

func (s *AnalysisStore) InvalidateURI(uri string)

func (*AnalysisStore) Snapshot

func (s *AnalysisStore) Snapshot(root string, document Document) *AnalysisSnapshot

func (*AnalysisStore) Transient

func (s *AnalysisStore) Transient(root string, document Document, source string) (*goxcompiler.Module, error)

Transient analyzes repaired editor text without making it authoritative for the document version. The result is cached independently from Snapshot so a repeated completion on the same dangling selector does not rebuild the full semantic workspace on every keystroke/request.

type CallHierarchyIncomingCall

type CallHierarchyIncomingCall struct {
	From       CallHierarchyItem `json:"from"`
	FromRanges []Range           `json:"fromRanges"`
}

type CallHierarchyIncomingCallsParams

type CallHierarchyIncomingCallsParams struct {
	Item CallHierarchyItem `json:"item"`
}

type CallHierarchyItem

type CallHierarchyItem struct {
	Name           string        `json:"name"`
	Kind           int           `json:"kind"`
	Detail         string        `json:"detail,omitempty"`
	URI            string        `json:"uri"`
	Range          Range         `json:"range"`
	SelectionRange Range         `json:"selectionRange"`
	Data           hierarchyData `json:"data"`
}

type CallHierarchyOutgoingCall

type CallHierarchyOutgoingCall struct {
	To         CallHierarchyItem `json:"to"`
	FromRanges []Range           `json:"fromRanges"`
}

type CallHierarchyOutgoingCallsParams

type CallHierarchyOutgoingCallsParams struct {
	Item CallHierarchyItem `json:"item"`
}

type CodeAction

type CodeAction struct {
	Title       string         `json:"title"`
	Kind        string         `json:"kind,omitempty"`
	Diagnostics []Diagnostic   `json:"diagnostics,omitempty"`
	Edit        *WorkspaceEdit `json:"edit,omitempty"`
	IsPreferred bool           `json:"isPreferred,omitempty"`
}

type CodeActionContext

type CodeActionContext struct {
	Diagnostics []Diagnostic `json:"diagnostics"`
	Only        []string     `json:"only,omitempty"`
}

type CodeActionParams

type CodeActionParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Range        Range                  `json:"range"`
	Context      CodeActionContext      `json:"context"`
}

type CompletionItem

type CompletionItem struct {
	Label               string                        `json:"label"`
	LabelDetails        *CompletionItemLabelDetails   `json:"labelDetails,omitempty"`
	Kind                int                           `json:"kind,omitempty"`
	Detail              string                        `json:"detail,omitempty"`
	InsertText          string                        `json:"insertText,omitempty"`
	InsertTextFormat    int                           `json:"insertTextFormat,omitempty"`
	FilterText          string                        `json:"filterText,omitempty"`
	SortText            string                        `json:"sortText,omitempty"`
	TextEdit            *CompletionTextEdit           `json:"textEdit,omitempty"`
	AdditionalTextEdits []CompletionTextEdit          `json:"additionalTextEdits,omitempty"`
	CandidateType       string                        `json:"-"`
	CandidateUnderlying string                        `json:"-"`
	CandidateAlias      bool                          `json:"-"`
	CandidateValue      string                        `json:"-"`
	CandidateResults    []string                      `json:"-"`
	CandidateParameters []goxcompiler.SourceParameter `json:"-"`
}

type CompletionItemLabelDetails

type CompletionItemLabelDetails struct {
	Detail      string `json:"detail,omitempty"`
	Description string `json:"description,omitempty"`
}

CompletionItemLabelDetails uses the LSP label-details presentation so the completion list can show where an otherwise identical symbol comes from. Detail is appended to the label; Description is shown as its provenance.

type CompletionList

type CompletionList struct {
	IsIncomplete bool             `json:"isIncomplete"`
	Items        []CompletionItem `json:"items"`
}

type CompletionParams

type CompletionParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Position     Position               `json:"position"`
}

type CompletionTextEdit

type CompletionTextEdit struct {
	Range   Range  `json:"range"`
	NewText string `json:"newText"`
}

type CreateFilesParams

type CreateFilesParams struct {
	Files []FileCreate `json:"files"`
}

type DeleteFilesParams

type DeleteFilesParams struct {
	Files []FileDelete `json:"files"`
}

type Diagnostic

type Diagnostic struct {
	Range    Range  `json:"range"`
	Severity int    `json:"severity,omitempty"`
	Code     string `json:"code,omitempty"`
	Source   string `json:"source,omitempty"`
	Message  string `json:"message"`
}

func Diagnostics

func Diagnostics(document Document) []Diagnostic

type DidChangeTextDocumentParams

type DidChangeTextDocumentParams struct {
	TextDocument   VersionedTextDocumentIdentifier  `json:"textDocument"`
	ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"`
}

type DidChangeWatchedFilesParams

type DidChangeWatchedFilesParams struct {
	Changes []FileEvent `json:"changes"`
}

type DidCloseTextDocumentParams

type DidCloseTextDocumentParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type DidOpenTextDocumentParams

type DidOpenTextDocumentParams struct {
	TextDocument TextDocumentItem `json:"textDocument"`
}

type Document

type Document struct {
	URI        string
	Path       string
	LanguageID string
	Version    int
	Text       string
	// contains filtered or unexported fields
}

func (Document) Offset

func (d Document) Offset(position Position) (int, error)

func (Document) Position

func (d Document) Position(offset int) (Position, error)

type DocumentFormattingParams

type DocumentFormattingParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Options      FormattingOptions      `json:"options"`
}

type DocumentHighlight

type DocumentHighlight struct {
	Range Range `json:"range"`
	Kind  int   `json:"kind,omitempty"`
}

type DocumentOnTypeFormattingParams

type DocumentOnTypeFormattingParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Position     Position               `json:"position"`
	Ch           string                 `json:"ch"`
	Options      FormattingOptions      `json:"options"`
}

type DocumentRangeFormattingParams

type DocumentRangeFormattingParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Range        Range                  `json:"range"`
	Options      FormattingOptions      `json:"options"`
}

type DocumentStore

type DocumentStore struct {
	// contains filtered or unexported fields
}

func NewDocumentStore

func NewDocumentStore() *DocumentStore

func (*DocumentStore) Change

func (*DocumentStore) Close

func (s *DocumentStore) Close(uri string) bool

func (*DocumentStore) Documents

func (s *DocumentStore) Documents() []Document

func (*DocumentStore) Get

func (s *DocumentStore) Get(uri string) (Document, bool)

func (*DocumentStore) Len

func (s *DocumentStore) Len() int

func (*DocumentStore) Open

func (s *DocumentStore) Open(document TextDocumentItem) error

type DocumentSymbol

type DocumentSymbol struct {
	Name           string           `json:"name"`
	Detail         string           `json:"detail,omitempty"`
	Kind           int              `json:"kind"`
	Range          Range            `json:"range"`
	SelectionRange Range            `json:"selectionRange"`
	Children       []DocumentSymbol `json:"children,omitempty"`
}

type DocumentSymbolParams

type DocumentSymbolParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type FileCreate

type FileCreate struct {
	URI string `json:"uri"`
}

type FileDelete

type FileDelete struct {
	URI string `json:"uri"`
}

type FileEvent

type FileEvent struct {
	URI  string `json:"uri"`
	Type int    `json:"type"`
}

type FileRename

type FileRename struct {
	OldURI string `json:"oldUri"`
	NewURI string `json:"newUri"`
}

type FoldingRange

type FoldingRange struct {
	StartLine      int    `json:"startLine"`
	StartCharacter int    `json:"startCharacter,omitempty"`
	EndLine        int    `json:"endLine"`
	EndCharacter   int    `json:"endCharacter,omitempty"`
	Kind           string `json:"kind,omitempty"`
}

type FoldingRangeParams

type FoldingRangeParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type FormattingOptions

type FormattingOptions struct {
	TabSize      int  `json:"tabSize"`
	InsertSpaces bool `json:"insertSpaces"`
}

type GoDefinition

type GoDefinition struct {
	Path   string
	Offset int
	Length int
}

type GoPackage

type GoPackage struct {
	Path       string
	Name       string
	Definition GoDefinition
	Exports    []GoPackageExport
}

type GoPackageCandidate

type GoPackageCandidate struct {
	// Path is the canonical Go import path. Name is the identifier declared by
	// the package clause, and is intentionally independent from the last path
	// segment. Consumers must use Name for aliases and code completions.
	Path string
	Name string
}

type GoPackageExport

type GoPackageExport struct {
	Name       string
	Detail     string
	Kind       string
	Definition GoDefinition
	Members    []GoPackageMember
	Type       string
	Underlying string
	Alias      bool
	Value      string
	Results    []string
	Parameters []goxcompiler.SourceParameter
}

type GoPackageIndex

type GoPackageIndex struct {
	// contains filtered or unexported fields
}

func NewGoPackageIndex

func NewGoPackageIndex() *GoPackageIndex

func (*GoPackageIndex) Discover

func (i *GoPackageIndex) Discover(root string) ([]GoPackageCandidate, error)

func (*GoPackageIndex) ExportedPackageDetails

func (i *GoPackageIndex) ExportedPackageDetails(root, importPath string) (GoPackage, error)

ExportedPackageDetails materializes the richer source projection for one package from the file manifest captured while building ExportedPackages. It is intentionally lazy: a global prefix such as Spl should pay detailed AST printing/type-shape extraction only for packages that export matching names.

func (*GoPackageIndex) ExportedPackages

func (i *GoPackageIndex) ExportedPackages(root string) ([]GoPackage, error)

ExportedPackages returns a shallow global export-name index for the standard library and declared module dependencies. It deliberately records only the package, exported identifier, and coarse declaration kind. Completion can therefore reject almost every package using names alone and materialize signatures/types only for packages that actually match the typed prefix.

func (*GoPackageIndex) Invalidate

func (i *GoPackageIndex) Invalidate()

func (*GoPackageIndex) InvalidateProjectGoPackage

func (i *GoPackageIndex) InvalidateProjectGoPackage(root, importPath string, affected []string, candidate *GoPackageCandidate)

InvalidateProjectGoPackage updates only the index layers that can depend on a local module package. Global shallow exports/details describe stdlib and declared module dependencies, so a source edit inside the current module must not evict those expensive root-wide caches.

affected contains the changed package and every local package that imports it transitively. Their typed/source projections may embed types from the changed package and are therefore evicted together. discovery is patched in place for the changed directory so stdlib/dependency inventory remains warm.

func (*GoPackageIndex) InvalidateRoot

func (i *GoPackageIndex) InvalidateRoot(root string)

InvalidateRoot drops only package data associated with one workspace. Other workspace folders keep their warm caches when module metadata changes elsewhere. Local .go edits use InvalidateProjectGoPackage instead.

func (*GoPackageIndex) Load

func (i *GoPackageIndex) Load(root, importPath string) (GoPackage, error)

func (*GoPackageIndex) PackageName

func (i *GoPackageIndex) PackageName(root, importPath string) (string, error)

PackageName resolves only the identifier declared by a Go package. It is intentionally separate from Load: alias resolution during completion must not type-check the package, parse its dependency graph, or build exports just to learn the package clause name.

func (*GoPackageIndex) ProjectGoPackageInvalidationForFile

func (i *GoPackageIndex) ProjectGoPackageInvalidationForFile(root, filename string) (projectGoPackageInvalidation, bool)

ProjectGoPackageInvalidationForFile incrementally updates the persistent local import graph for root and returns the changed package plus its reverse importer closure. The first call for a root builds the graph once; subsequent calls rescan only the changed package directory.

type GoPackageMember

type GoPackageMember struct {
	Name       string
	Detail     string
	Kind       string
	Definition GoDefinition
	Type       string
	Underlying string
	Alias      bool
	Results    []string
	Parameters []goxcompiler.SourceParameter
}

type Hover

type Hover struct {
	Contents MarkupContent `json:"contents"`
}

type IndexedSymbol

type IndexedSymbol struct {
	URI    string
	Symbol goxcompiler.SourceSymbol
}

type InitializeParams

type InitializeParams struct {
	RootPath         string            `json:"rootPath,omitempty"`
	RootURI          string            `json:"rootUri,omitempty"`
	WorkspaceFolders []WorkspaceFolder `json:"workspaceFolders,omitempty"`
}

type InlayHint

type InlayHint struct {
	Position     Position       `json:"position"`
	Label        string         `json:"label"`
	Kind         int            `json:"kind,omitempty"`
	Tooltip      *MarkupContent `json:"tooltip,omitempty"`
	PaddingRight bool           `json:"paddingRight,omitempty"`
}

type InlayHintParams

type InlayHintParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Range        Range                  `json:"range"`
}

type LinkedEditingRanges

type LinkedEditingRanges struct {
	Ranges      []Range `json:"ranges"`
	WordPattern string  `json:"wordPattern,omitempty"`
}

type Location

type Location struct {
	URI   string `json:"uri"`
	Range Range  `json:"range"`
}
type LocationLink struct {
	OriginSelectionRange Range  `json:"originSelectionRange"`
	TargetURI            string `json:"targetUri"`
	TargetRange          Range  `json:"targetRange"`
	TargetSelectionRange Range  `json:"targetSelectionRange"`
}

type MarkupContent

type MarkupContent struct {
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

type ParameterInformation

type ParameterInformation struct {
	Label string `json:"label"`
}

type Position

type Position struct {
	Line      int `json:"line"`
	Character int `json:"character"`
}

type PrepareRenameResult

type PrepareRenameResult struct {
	Range       Range  `json:"range"`
	Placeholder string `json:"placeholder"`
}

type PublishDiagnosticsParams

type PublishDiagnosticsParams struct {
	URI         string       `json:"uri"`
	Version     int          `json:"version,omitempty"`
	Diagnostics []Diagnostic `json:"diagnostics"`
}

type Range

type Range struct {
	Start Position `json:"start"`
	End   Position `json:"end"`
}

type ReferenceContext

type ReferenceContext struct {
	IncludeDeclaration bool `json:"includeDeclaration"`
}

type ReferenceParams

type ReferenceParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Position     Position               `json:"position"`
	Context      ReferenceContext       `json:"context"`
}

type RenameFilesParams

type RenameFilesParams struct {
	Files []FileRename `json:"files"`
}

type RenameParams

type RenameParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Position     Position               `json:"position"`
	NewName      string                 `json:"newName"`
}

type SelectionRange

type SelectionRange struct {
	Range  Range           `json:"range"`
	Parent *SelectionRange `json:"parent,omitempty"`
}

type SelectionRangeParams

type SelectionRangeParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Positions    []Position             `json:"positions"`
}

type SemanticTokens

type SemanticTokens struct {
	Data []uint32 `json:"data"`
}

type SemanticTokensParams

type SemanticTokensParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

type Server

type Server struct {
	// Background starts after the client initializes and stops with the transport.
	Background func(context.Context, func(string, any) error)
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Document

func (s *Server) Document(uri string) (Document, bool)

func (*Server) DocumentCount

func (s *Server) DocumentCount() int

func (*Server) Serve

func (s *Server) Serve(reader io.Reader, writer io.Writer) error

func (*Server) SymbolDefinitions

func (s *Server) SymbolDefinitions(name string) []IndexedSymbol

type SignatureHelp

type SignatureHelp struct {
	Signatures      []SignatureInformation `json:"signatures"`
	ActiveSignature int                    `json:"activeSignature,omitempty"`
	ActiveParameter int                    `json:"activeParameter,omitempty"`
}

type SignatureHelpParams

type SignatureHelpParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Position     Position               `json:"position"`
}

type SignatureInformation

type SignatureInformation struct {
	Label      string                 `json:"label"`
	Parameters []ParameterInformation `json:"parameters,omitempty"`
}

type SymbolInformation

type SymbolInformation struct {
	Name          string   `json:"name"`
	Kind          int      `json:"kind"`
	Location      Location `json:"location"`
	ContainerName string   `json:"containerName,omitempty"`
}

type TextDocumentContentChangeEvent

type TextDocumentContentChangeEvent struct {
	Range       *Range `json:"range,omitempty"`
	RangeLength *int   `json:"rangeLength,omitempty"`
	Text        string `json:"text"`
}

type TextDocumentIdentifier

type TextDocumentIdentifier struct {
	URI string `json:"uri"`
}

type TextDocumentItem

type TextDocumentItem struct {
	URI        string `json:"uri"`
	LanguageID string `json:"languageId"`
	Version    int    `json:"version"`
	Text       string `json:"text"`
}

type TextDocumentPositionParams

type TextDocumentPositionParams struct {
	TextDocument TextDocumentIdentifier `json:"textDocument"`
	Position     Position               `json:"position"`
}

type TypeHierarchyItem

type TypeHierarchyItem struct {
	Name           string        `json:"name"`
	Kind           int           `json:"kind"`
	Detail         string        `json:"detail,omitempty"`
	URI            string        `json:"uri"`
	Range          Range         `json:"range"`
	SelectionRange Range         `json:"selectionRange"`
	Data           hierarchyData `json:"data"`
}

type TypeHierarchySubtypesParams

type TypeHierarchySubtypesParams struct {
	Item TypeHierarchyItem `json:"item"`
}

type TypeHierarchySupertypesParams

type TypeHierarchySupertypesParams struct {
	Item TypeHierarchyItem `json:"item"`
}

type VersionedTextDocumentIdentifier

type VersionedTextDocumentIdentifier struct {
	URI     string `json:"uri"`
	Version int    `json:"version"`
}

type WorkspaceEdit

type WorkspaceEdit struct {
	Changes map[string][]CompletionTextEdit `json:"changes"`
}

type WorkspaceFolder

type WorkspaceFolder struct {
	URI  string `json:"uri"`
	Name string `json:"name"`
}

type WorkspaceIndex

type WorkspaceIndex struct {
	// contains filtered or unexported fields
}

WorkspaceIndex keeps compiler-owned declarations for the documents known by the language server. LSP features query this index instead of reparsing GOX.

func NewWorkspaceIndex

func NewWorkspaceIndex() *WorkspaceIndex

func (*WorkspaceIndex) ClientSemanticAt

func (i *WorkspaceIndex) ClientSemanticAt(uri string, offset int) (goxcompiler.ClientSemantic, bool)

func (*WorkspaceIndex) CloseOpen

func (i *WorkspaceIndex) CloseOpen(uri string)

func (*WorkspaceIndex) Definitions

func (i *WorkspaceIndex) Definitions(name string) []IndexedSymbol

func (*WorkspaceIndex) Document

func (i *WorkspaceIndex) Document(uri string) (Document, bool)

func (*WorkspaceIndex) DocumentSymbols

func (i *WorkspaceIndex) DocumentSymbols(uri string) []IndexedSymbol

func (*WorkspaceIndex) Documents

func (i *WorkspaceIndex) Documents() []Document

func (*WorkspaceIndex) GoImports

func (i *WorkspaceIndex) GoImports(uri string) []goxcompiler.ImportDecl

func (*WorkspaceIndex) Imports

func (i *WorkspaceIndex) Imports(uri string) []goxcompiler.GoxImport

func (*WorkspaceIndex) LocalDeclarationAt

func (i *WorkspaceIndex) LocalDeclarationAt(uri string, offset int) (goxcompiler.LocalSymbol, bool)

func (*WorkspaceIndex) LocalSymbolAt

func (i *WorkspaceIndex) LocalSymbolAt(uri, name string, offset int) (goxcompiler.LocalSymbol, bool)

func (*WorkspaceIndex) LocalSymbols

func (i *WorkspaceIndex) LocalSymbols(uri string) []goxcompiler.LocalSymbol

func (*WorkspaceIndex) ReferenceAt

func (i *WorkspaceIndex) ReferenceAt(uri string, offset int) (goxcompiler.SourceReference, bool)

func (*WorkspaceIndex) Remove

func (i *WorkspaceIndex) Remove(uri string)

func (*WorkspaceIndex) RemoveDisk

func (i *WorkspaceIndex) RemoveDisk(uri string)

func (*WorkspaceIndex) SelectorReferenceAt

func (i *WorkspaceIndex) SelectorReferenceAt(uri string, offset int) (goxcompiler.SelectorReference, bool)

func (*WorkspaceIndex) Symbols

func (i *WorkspaceIndex) Symbols() []IndexedSymbol

func (*WorkspaceIndex) TemplateRanges

func (i *WorkspaceIndex) TemplateRanges(uri string) []goxmap.Range

func (*WorkspaceIndex) UnresolvedIdentifiers

func (i *WorkspaceIndex) UnresolvedIdentifiers(uri string) []goxcompiler.UnresolvedIdentifier

func (*WorkspaceIndex) Update

func (i *WorkspaceIndex) Update(document Document) error

func (*WorkspaceIndex) UpdateDisk

func (i *WorkspaceIndex) UpdateDisk(document Document) error

func (*WorkspaceIndex) UpdateOpen

func (i *WorkspaceIndex) UpdateOpen(document Document) error

func (*WorkspaceIndex) UpdateOpenModule

func (i *WorkspaceIndex) UpdateOpenModule(document Document, module *goxcompiler.Module) error

UpdateOpenModule updates the compatibility index from the canonical analysis already owned by AnalysisSnapshot. It prevents didOpen/didChange from reparsing the same document solely to refresh legacy consumers.

func (*WorkspaceIndex) VisibleLocalSymbols

func (i *WorkspaceIndex) VisibleLocalSymbols(uri string, offset int) []goxcompiler.LocalSymbol

type WorkspaceSymbolParams

type WorkspaceSymbolParams struct {
	Query string `json:"query"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL