lsp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: MPL-2.0 Imports: 11 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 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 string

func FileHandlerFromPath

func FileHandlerFromPath(path string) FileHandler

func (FileHandler) Dir

func (fh FileHandler) Dir() string

func (FileHandler) DocumentURI

func (fh FileHandler) DocumentURI() lsp.DocumentURI

func (FileHandler) Filename

func (fh FileHandler) Filename() string

func (FileHandler) FullPath

func (fh FileHandler) FullPath() string

func (FileHandler) URI

func (fh FileHandler) URI() string

func (FileHandler) Valid

func (fh FileHandler) Valid() bool

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