lsp

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package lsp contains types for the Language Server Protocol LSP: https://microsoft.github.io/language-server-protocol/specification and mappings from these elements into the token.Tokens types which are used internally in GoPi.

Index

Constants

This section is empty.

Variables

View Source
var KiT_CompletionKind = kit.Enums.AddEnumAltLower(CompletionKindN, kit.NotBitFlag, nil, "Ck")
View Source
var KiT_SymbolKind = kit.Enums.AddEnum(SymbolKindN, kit.NotBitFlag, nil)

SymbolKindTokenMap maps between symbols and token.Tokens

View Source
var TokenSymbolKindMap map[token.Tokens]SymbolKind

TokenSymbolKindMap maps from tokens to LSP SymbolKind

Functions

This section is empty.

Types

type CompletionKind

type CompletionKind int

CompletionKind is the Language Server Protocol (LSP) CompletionKind, which we map onto the token.Tokens that are used internally.

const (
	CkNone CompletionKind = iota
	CkText
	CkMethod
	CkFunction
	CkConstructor
	CkField
	CkVariable
	CkClass
	CkInterface
	CkModule
	CkProperty
	CkUnit
	CkValue
	CkEnum
	CkKeyword
	CkSnippet
	Color
	CkFile
	CkReference
	CkFolder
	CkEnumMember
	CkConstant
	CkStruct
	CkEvent
	CkOperator
	CkTypeParameter

	CompletionKindN
)

CompletionKinds -- note these largely overlap with CompletionKinds and are thus kinda partially redundant..

func (*CompletionKind) FromString

func (i *CompletionKind) FromString(s string) error

func (CompletionKind) MarshalJSON

func (ev CompletionKind) MarshalJSON() ([]byte, error)

func (CompletionKind) MarshalText

func (ev CompletionKind) MarshalText() ([]byte, error)

map keys require text marshaling:

func (CompletionKind) String

func (i CompletionKind) String() string

func (*CompletionKind) UnmarshalJSON

func (ev *CompletionKind) UnmarshalJSON(b []byte) error

func (*CompletionKind) UnmarshalText

func (ev *CompletionKind) UnmarshalText(b []byte) error

type SymbolKind

type SymbolKind int

SymbolKind is the Language Server Protocol (LSP) SymbolKind, which we map onto the token.Tokens that are used internally.

const (
	NoSymbolKind SymbolKind = iota
	File                    // 1 in LSP
	Module
	Namespace
	Package
	Class
	Method
	Property
	Field
	Constructor
	Enum
	Interface
	Function
	Variable
	Constant
	String
	Number
	Boolean
	Array
	Object
	Key
	Null
	EnumMember
	Struct
	Event
	Operator
	TypeParameter // 26 in LSP

	SymbolKindN
)

SymbolKind is the list of SymbolKind items from LSP

func (*SymbolKind) FromString

func (i *SymbolKind) FromString(s string) error

func (SymbolKind) MarshalJSON

func (ev SymbolKind) MarshalJSON() ([]byte, error)

func (SymbolKind) MarshalText

func (ev SymbolKind) MarshalText() ([]byte, error)

map keys require text marshaling:

func (SymbolKind) String

func (i SymbolKind) String() string

func (*SymbolKind) UnmarshalJSON

func (ev *SymbolKind) UnmarshalJSON(b []byte) error

func (*SymbolKind) UnmarshalText

func (ev *SymbolKind) UnmarshalText(b []byte) error

Jump to

Keyboard shortcuts

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