Documentation ¶
Index ¶
- func FindInStrings(a []string, x string) int
- func IsBuiltInType(typeToCheckUnaliased dtype.Type) bool
- type Compiler
- type DecoratedTokenScanner
- type DiagnosticsForDocument
- type DiagnosticsForDocuments
- type DocumentCache
- func (d *DocumentCache) Close(path LocalFileSystemPath) error
- func (d *DocumentCache) Get(path LocalFileSystemPath) (*InMemoryDocument, error)
- func (d *DocumentCache) GetDocumentByVersion(path LocalFileSystemPath, version DocumentVersion) (*InMemoryDocument, error)
- func (d *DocumentCache) Open(path LocalFileSystemPath, payload string) error
- func (d *DocumentCache) ReadDocument(path loader.LocalFileSystemPath) (string, error)
- func (d *DocumentCache) TrackDocument(path LocalFileSystemPath, payload string) error
- type DocumentCacher
- type DocumentVersion
- type InMemoryDocument
- type LineInfo
- type LocalFileSystemPath
- type LspImpl
- func (l *LspImpl) AllModules() []*decorated.Module
- func (l *LspImpl) Compile(filename string) (*decorated.Module, error)
- func (l *LspImpl) FindModuleHelper(sourceFile token.DocumentURI) *decorated.Module
- func (l *LspImpl) FindToken(sourceFile token.DocumentURI, position token.Position) decorated.TypeOrToken
- func (l *LspImpl) GetDocument(localFilePath LocalFileSystemPath, newVersion DocumentVersion) (*InMemoryDocument, error)
- func (l *LspImpl) RootTokens(sourceFile token.DocumentURI) []decorated.TypeOrToken
- type SemanticBuilder
- type Service
- func (s *Service) CompileAndReportErrors(uri lsp.DocumentURI, version uint, conn lspserv.Connection) error
- func (s *Service) HandleCodeAction(params lsp.CodeActionParams, conn lspserv.Connection) (*lsp.CodeAction, error)
- func (s *Service) HandleCodeActionResolve(params lsp.CodeAction, conn lspserv.Connection) (*lsp.CodeAction, error)
- func (s *Service) HandleCodeLens(params lsp.CodeLensParams, conn lspserv.Connection) ([]*lsp.CodeLens, error)
- func (s *Service) HandleCodeLensResolve(params lsp.CodeLens, conn lspserv.Connection) (*lsp.CodeLens, error)
- func (s *Service) HandleCompletion(params lsp.CompletionParams, conn lspserv.Connection) (*lsp.CompletionList, error)
- func (s *Service) HandleCompletionItemResolve(params lsp.CompletionItem, conn lspserv.Connection) (*lsp.CompletionItem, error)
- func (s *Service) HandleDidChange(params lsp.DidChangeTextDocumentParams, conn lspserv.Connection) error
- func (s *Service) HandleDidChangeWatchedFiles(params lsp.DidChangeWatchedFilesParams, conn lspserv.Connection) error
- func (s *Service) HandleDidClose(params lsp.DidCloseTextDocumentParams, conn lspserv.Connection) error
- func (s *Service) HandleDidOpen(params lsp.DidOpenTextDocumentParams, conn lspserv.Connection) error
- func (s *Service) HandleDidSave(params lsp.DidSaveTextDocumentParams, conn lspserv.Connection) error
- func (s *Service) HandleFindReferences(params lsp.ReferenceParams, conn lspserv.Connection) ([]*lsp.Location, error)
- func (s *Service) HandleFormatting(params lsp.DocumentFormattingParams, conn lspserv.Connection) ([]*lsp.TextEdit, error)
- func (s *Service) HandleGotoDeclaration(params lsp.DeclarationOptions, conn lspserv.Connection) (*lsp.Location, error)
- func (s *Service) HandleGotoDefinition(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Location, error)
- func (s *Service) HandleGotoImplementation(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Location, error)
- func (s *Service) HandleGotoTypeDefinition(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Location, error)
- func (s *Service) HandleHighlights(params lsp.DocumentHighlightParams, conn lspserv.Connection) ([]*lsp.DocumentHighlight, error)
- func (s *Service) HandleHover(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Hover, error)
- func (s *Service) HandleLinkedEditingRange(params lsp.LinkedEditingRangeParams, conn lspserv.Connection) (*lsp.LinkedEditingRanges, error)
- func (s *Service) HandleRename(params lsp.RenameParams) (*lsp.WorkspaceEdit, error)
- func (s *Service) HandleSemanticTokensFull(params lsp.SemanticTokensParams, conn lspserv.Connection) (*lsp.SemanticTokens, error)
- func (s *Service) HandleSignatureHelp(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.SignatureHelp, error)
- func (s *Service) HandleSymbol(params lsp.DocumentSymbolParams, conn lspserv.Connection) ([]*lsp.DocumentSymbol, error)
- func (s *Service) HandleWillSave(params lsp.WillSaveTextDocumentParams, conn lspserv.Connection) error
- func (s *Service) Reset() error
- func (s *Service) ResetCaches(lock bool)
- func (s *Service) ShutDown()
- type Workspacer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindInStrings ¶
func IsBuiltInType ¶
Types ¶
type DecoratedTokenScanner ¶
type DecoratedTokenScanner interface { FindToken(documentURI token.DocumentURI, position token.Position) decorated.TypeOrToken RootTokens(documentURI token.DocumentURI) []decorated.TypeOrToken }
type DiagnosticsForDocument ¶
type DiagnosticsForDocument struct {
// contains filtered or unexported fields
}
func (*DiagnosticsForDocument) Add ¶
func (d *DiagnosticsForDocument) Add(lspDiagnostic lsp.Diagnostic)
func (*DiagnosticsForDocument) All ¶
func (d *DiagnosticsForDocument) All() []lsp.Diagnostic
func (*DiagnosticsForDocument) Clear ¶
func (d *DiagnosticsForDocument) Clear()
func (*DiagnosticsForDocument) IsEmpty ¶
func (d *DiagnosticsForDocument) IsEmpty() bool
type DiagnosticsForDocuments ¶
type DiagnosticsForDocuments struct {
// contains filtered or unexported fields
}
func NewDiagnosticsForDocuments ¶
func NewDiagnosticsForDocuments() *DiagnosticsForDocuments
func (*DiagnosticsForDocuments) Add ¶
func (d *DiagnosticsForDocuments) Add(localPath LocalFileSystemPath, lspDiagnostic lsp.Diagnostic)
func (*DiagnosticsForDocuments) All ¶
func (d *DiagnosticsForDocuments) All() map[string]*DiagnosticsForDocument
func (*DiagnosticsForDocuments) Clear ¶
func (d *DiagnosticsForDocuments) Clear()
func (*DiagnosticsForDocuments) Tidy ¶
func (d *DiagnosticsForDocuments) Tidy()
type DocumentCache ¶
type DocumentCache struct {
// contains filtered or unexported fields
}
func NewDocumentCache ¶
func NewDocumentCache(fallbackProvider loader.DocumentProvider) *DocumentCache
func (*DocumentCache) Close ¶
func (d *DocumentCache) Close(path LocalFileSystemPath) error
func (*DocumentCache) Get ¶
func (d *DocumentCache) Get(path LocalFileSystemPath) (*InMemoryDocument, error)
func (*DocumentCache) GetDocumentByVersion ¶
func (d *DocumentCache) GetDocumentByVersion(path LocalFileSystemPath, version DocumentVersion) (*InMemoryDocument, error)
func (*DocumentCache) Open ¶
func (d *DocumentCache) Open(path LocalFileSystemPath, payload string) error
func (*DocumentCache) ReadDocument ¶
func (d *DocumentCache) ReadDocument(path loader.LocalFileSystemPath) (string, error)
func (*DocumentCache) TrackDocument ¶
func (d *DocumentCache) TrackDocument(path LocalFileSystemPath, payload string) error
type DocumentCacher ¶
type DocumentCacher interface {
GetDocument(filename LocalFileSystemPath, version DocumentVersion) (*InMemoryDocument, error)
}
type DocumentVersion ¶
type DocumentVersion uint
type InMemoryDocument ¶
type InMemoryDocument struct {
// contains filtered or unexported fields
}
func NewInMemoryDocument ¶
func NewInMemoryDocument(payload string) *InMemoryDocument
func (*InMemoryDocument) DebugLines ¶
func (c *InMemoryDocument) DebugLines()
func (*InMemoryDocument) MakeChange ¶
func (c *InMemoryDocument) MakeChange(editRange token.Range, text string) error
func (*InMemoryDocument) Overwrite ¶
func (c *InMemoryDocument) Overwrite(payload string)
func (*InMemoryDocument) UpdateVersion ¶
func (c *InMemoryDocument) UpdateVersion(newVersion DocumentVersion) error
type LocalFileSystemPath ¶
type LocalFileSystemPath string
type LspImpl ¶
type LspImpl struct {
// contains filtered or unexported fields
}
func NewLspImpl ¶
func NewLspImpl(fallbackProvider loader.DocumentProvider, configuration environment.Environment) *LspImpl
func (*LspImpl) AllModules ¶
func (*LspImpl) FindModuleHelper ¶
func (l *LspImpl) FindModuleHelper(sourceFile token.DocumentURI) *decorated.Module
func (*LspImpl) FindToken ¶
func (l *LspImpl) FindToken(sourceFile token.DocumentURI, position token.Position) decorated.TypeOrToken
func (*LspImpl) GetDocument ¶
func (l *LspImpl) GetDocument(localFilePath LocalFileSystemPath, newVersion DocumentVersion) (*InMemoryDocument, error)
func (*LspImpl) RootTokens ¶
func (l *LspImpl) RootTokens(sourceFile token.DocumentURI) []decorated.TypeOrToken
type SemanticBuilder ¶
type SemanticBuilder struct {
// contains filtered or unexported fields
}
"tokenTypes": [
"namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "operator"
], "tokenModifiers": [
func NewSemanticBuilder ¶
func NewSemanticBuilder() *SemanticBuilder
func (*SemanticBuilder) EncodeSymbol ¶
func (*SemanticBuilder) EncodedValues ¶
func (s *SemanticBuilder) EncodedValues() []uint
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(compiler Compiler, scanner DecoratedTokenScanner, documents DocumentCacher, workspacer Workspacer) *Service
func (*Service) CompileAndReportErrors ¶
func (s *Service) CompileAndReportErrors(uri lsp.DocumentURI, version uint, conn lspserv.Connection) error
func (*Service) HandleCodeAction ¶
func (s *Service) HandleCodeAction(params lsp.CodeActionParams, conn lspserv.Connection) (*lsp.CodeAction, error)
func (*Service) HandleCodeActionResolve ¶
func (s *Service) HandleCodeActionResolve(params lsp.CodeAction, conn lspserv.Connection) (*lsp.CodeAction, error)
func (*Service) HandleCodeLens ¶
func (s *Service) HandleCodeLens(params lsp.CodeLensParams, conn lspserv.Connection) ([]*lsp.CodeLens, error)
func (*Service) HandleCodeLensResolve ¶
func (s *Service) HandleCodeLensResolve(params lsp.CodeLens, conn lspserv.Connection) (*lsp.CodeLens, error)
func (*Service) HandleCompletion ¶
func (s *Service) HandleCompletion(params lsp.CompletionParams, conn lspserv.Connection) (*lsp.CompletionList, error)
func (*Service) HandleCompletionItemResolve ¶
func (s *Service) HandleCompletionItemResolve(params lsp.CompletionItem, conn lspserv.Connection) (*lsp.CompletionItem, error)
func (*Service) HandleDidChange ¶
func (s *Service) HandleDidChange(params lsp.DidChangeTextDocumentParams, conn lspserv.Connection) error
func (*Service) HandleDidChangeWatchedFiles ¶
func (s *Service) HandleDidChangeWatchedFiles(params lsp.DidChangeWatchedFilesParams, conn lspserv.Connection) error
func (*Service) HandleDidClose ¶
func (s *Service) HandleDidClose(params lsp.DidCloseTextDocumentParams, conn lspserv.Connection) error
func (*Service) HandleDidOpen ¶
func (s *Service) HandleDidOpen(params lsp.DidOpenTextDocumentParams, conn lspserv.Connection) error
func (*Service) HandleDidSave ¶
func (s *Service) HandleDidSave(params lsp.DidSaveTextDocumentParams, conn lspserv.Connection) error
func (*Service) HandleFindReferences ¶
func (s *Service) HandleFindReferences(params lsp.ReferenceParams, conn lspserv.Connection) ([]*lsp.Location, error)
func (*Service) HandleFormatting ¶
func (s *Service) HandleFormatting(params lsp.DocumentFormattingParams, conn lspserv.Connection) ([]*lsp.TextEdit, error)
func (*Service) HandleGotoDeclaration ¶
func (s *Service) HandleGotoDeclaration(params lsp.DeclarationOptions, conn lspserv.Connection) (*lsp.Location, error)
func (*Service) HandleGotoDefinition ¶
func (s *Service) HandleGotoDefinition(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Location, error)
func (*Service) HandleGotoImplementation ¶
func (s *Service) HandleGotoImplementation(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Location, error)
func (*Service) HandleGotoTypeDefinition ¶
func (s *Service) HandleGotoTypeDefinition(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Location, error)
func (*Service) HandleHighlights ¶
func (s *Service) HandleHighlights(params lsp.DocumentHighlightParams, conn lspserv.Connection) ([]*lsp.DocumentHighlight, error)
HandleHighlights :
func (*Service) HandleHover ¶
func (s *Service) HandleHover(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.Hover, error)
func (*Service) HandleLinkedEditingRange ¶
func (s *Service) HandleLinkedEditingRange(params lsp.LinkedEditingRangeParams, conn lspserv.Connection) (*lsp.LinkedEditingRanges, error)
func (*Service) HandleRename ¶
func (*Service) HandleSemanticTokensFull ¶
func (s *Service) HandleSemanticTokensFull(params lsp.SemanticTokensParams, conn lspserv.Connection) (*lsp.SemanticTokens, error)
func (*Service) HandleSignatureHelp ¶
func (s *Service) HandleSignatureHelp(params lsp.TextDocumentPositionParams, conn lspserv.Connection) (*lsp.SignatureHelp, error)
func (*Service) HandleSymbol ¶
func (s *Service) HandleSymbol(params lsp.DocumentSymbolParams, conn lspserv.Connection) ([]*lsp.DocumentSymbol, error)
func (*Service) HandleWillSave ¶
func (s *Service) HandleWillSave(params lsp.WillSaveTextDocumentParams, conn lspserv.Connection) error
func (*Service) ResetCaches ¶
type Workspacer ¶
Click to show internal directories.
Click to hide internal directories.