lsp

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompletionItem

func CompletionItem(candidate lang.CompletionCandidate, pos hcl.Pos, snippetSupport bool) lsp.CompletionItem

func CompletionList

func CompletionList(candidates lang.CompletionCandidates, pos hcl.Pos, caps lsp.TextDocumentClientCapabilities) lsp.CompletionList

func FileChange

func FileChange(chEvent lsp.TextDocumentContentChangeEvent, f File) (*fileChange, error)

func FileChanges

func FileChanges(events []lsp.TextDocumentContentChangeEvent, f File) (filesystem.FileChanges, error)

func FileFromDocumentItem

func FileFromDocumentItem(doc lsp.TextDocumentItem) *file

func FileHandlerFromDirPath added in v0.4.0

func FileHandlerFromDirPath(dirPath string) *fileHandler

func FileHandlerFromDirURI added in v0.4.0

func FileHandlerFromDirURI(dirUri lsp.DocumentURI) *fileHandler

func FileHandlerFromDocumentURI added in v0.4.0

func FileHandlerFromDocumentURI(docUri lsp.DocumentURI) *fileHandler

func FileHandlerFromPath

func FileHandlerFromPath(path string) *fileHandler

func FilePositionFromDocumentPosition

func FilePositionFromDocumentPosition(params lsp.TextDocumentPositionParams, f File) (*filePosition, error)

func TextEdits

func TextEdits(changes filesystem.FileChanges) []lsp.TextEdit

func VersionedFileHandler

func VersionedFileHandler(doc lsp.VersionedTextDocumentIdentifier) *versionedFileHandler

Types

type File

type File interface {
	URI() string
	FullPath() string
	Dir() string
	Filename() string
	Lines() source.Lines
}

type FileHandler

type FileHandler interface {
	Valid() bool
	Dir() string
	IsDir() bool
	Filename() string
	DocumentURI() lsp.DocumentURI
	URI() string
}

type InvalidLspPosErr

type InvalidLspPosErr struct {
	Pos lsp.Position
}

func (*InvalidLspPosErr) Error

func (e *InvalidLspPosErr) Error() string

Jump to

Keyboard shortcuts

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