lsp

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompletionItem

func CompletionItem(candidate lang.Candidate, snippet, markdown bool) lsp.CompletionItem

func ContentChange added in v0.6.0

func ContentChange(chEvent lsp.TextDocumentContentChangeEvent, f File) (*contentChange, error)

func ConvertSymbols added in v0.9.0

func ConvertSymbols(uri lsp.DocumentURI, sbs []decoder.Symbol) []lsp.SymbolInformation

func DocumentChanges added in v0.6.0

func DocumentChanges(events []lsp.TextDocumentContentChangeEvent, f File) (filesystem.DocumentChanges, 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 HCLRangeToLSP added in v0.7.0

func HCLRangeToLSP(hclRng hcl.Range) lsp.Range

func HCLSeverityToLSP added in v0.8.0

func HCLSeverityToLSP(severity hcl.DiagnosticSeverity) lsp.DiagnosticSeverity

func TextEdits

func TextEdits(changes filesystem.DocumentChanges) []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