lsp

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentChange added in v0.6.0

func ContentChange(chEvent lsp.TextDocumentContentChangeEvent) filesystem.DocumentChange

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 HCLDiagsToLSP added in v0.10.0

func HCLDiagsToLSP(hclDiags hcl.Diagnostics, source string) []lsp.Diagnostic

func HCLRangeToLSP added in v0.7.0

func HCLRangeToLSP(rng hcl.Range) lsp.Range

func HCLSeverityToLSP added in v0.8.0

func HCLSeverityToLSP(severity hcl.DiagnosticSeverity) lsp.DiagnosticSeverity

func HoverData added in v0.10.0

func HoverData(data *lang.HoverData, cc lsp.TextDocumentClientCapabilities) lsp.Hover

func TextEdits

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

func VersionedFileHandler

func VersionedFileHandler(doc lsp.VersionedTextDocumentIdentifier) *versionedFileHandler

Types

type CompletionItem

type CompletionItem struct {
	lsp.CompletionItem
	Command *lsp.Command `json:"command,omitempty"`
}

type CompletionList

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

func ToCompletionList added in v0.10.0

func ToCompletionList(candidates lang.Candidates, caps lsp.TextDocumentClientCapabilities) CompletionList

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
}

Jump to

Keyboard shortcuts

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