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 ¶
- Variables
- type CompletionKind
- func (i *CompletionKind) FromString(s string) error
- func (ev CompletionKind) MarshalJSON() ([]byte, error)
- func (ev CompletionKind) MarshalText() ([]byte, error)
- func (i CompletionKind) String() string
- func (ev *CompletionKind) UnmarshalJSON(b []byte) error
- func (ev *CompletionKind) UnmarshalText(b []byte) error
- type SymbolKind
Constants ¶
This section is empty.
Variables ¶
var KiT_CompletionKind = kit.Enums.AddEnumAltLower(CompletionKindN, kit.NotBitFlag, nil, "Ck")
var KiT_SymbolKind = kit.Enums.AddEnum(SymbolKindN, kit.NotBitFlag, nil)
var SymbolKindTokenMap = map[SymbolKind]token.Tokens{ Module: token.NameModule, Namespace: token.NameNamespace, Package: token.NamePackage, Class: token.NameClass, Method: token.NameMethod, Property: token.NameProperty, Field: token.NameField, Constructor: token.NameConstructor, Enum: token.NameEnum, Interface: token.NameInterface, Function: token.NameFunction, Variable: token.NameVar, Constant: token.NameConstant, String: token.LitStr, Number: token.LitNum, Boolean: token.LiteralBool, Array: token.NameArray, Object: token.NameObject, Key: token.NameTag, Null: token.None, EnumMember: token.NameEnumMember, Struct: token.NameStruct, Event: token.NameEvent, Operator: token.Operator, TypeParameter: token.NameTypeParam, }
SymbolKindTokenMap maps between symbols and token.Tokens
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