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 parse.
Index ¶
- Variables
- type CompletionKind
- func (i CompletionKind) Desc() string
- func (i CompletionKind) Int64() int64
- func (i CompletionKind) MarshalText() ([]byte, error)
- func (i *CompletionKind) SetInt64(in int64)
- func (i *CompletionKind) SetString(s string) error
- func (i CompletionKind) String() string
- func (i *CompletionKind) UnmarshalText(text []byte) error
- func (i CompletionKind) Values() []enums.Enum
- type SymbolKind
- func (i SymbolKind) Desc() string
- func (i SymbolKind) Int64() int64
- func (i SymbolKind) MarshalText() ([]byte, error)
- func (i *SymbolKind) SetInt64(in int64)
- func (i *SymbolKind) SetString(s string) error
- func (i SymbolKind) String() string
- func (i *SymbolKind) UnmarshalText(text []byte) error
- func (i SymbolKind) Values() []enums.Enum
Constants ¶
This section is empty.
Variables ¶
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 int32 //enums:enum -trim-prefix Ck
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 )
CompletionKinds -- note these largely overlap with CompletionKinds and are thus kinda partially redundant..
const CompletionKindN CompletionKind = 26
CompletionKindN is the highest valid value for type CompletionKind, plus one.
func CompletionKindValues ¶
func CompletionKindValues() []CompletionKind
CompletionKindValues returns all possible values for the type CompletionKind.
func (CompletionKind) Desc ¶
func (i CompletionKind) Desc() string
Desc returns the description of the CompletionKind value.
func (CompletionKind) Int64 ¶
func (i CompletionKind) Int64() int64
Int64 returns the CompletionKind value as an int64.
func (CompletionKind) MarshalText ¶
func (i CompletionKind) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*CompletionKind) SetInt64 ¶
func (i *CompletionKind) SetInt64(in int64)
SetInt64 sets the CompletionKind value from an int64.
func (*CompletionKind) SetString ¶
func (i *CompletionKind) SetString(s string) error
SetString sets the CompletionKind value from its string representation, and returns an error if the string is invalid.
func (CompletionKind) String ¶
func (i CompletionKind) String() string
String returns the string representation of this CompletionKind value.
func (*CompletionKind) UnmarshalText ¶
func (i *CompletionKind) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (CompletionKind) Values ¶
func (i CompletionKind) Values() []enums.Enum
Values returns all possible values for the type CompletionKind.
type SymbolKind ¶
type SymbolKind int32 //enums:enum
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 )
SymbolKind is the list of SymbolKind items from LSP
const SymbolKindN SymbolKind = 27
SymbolKindN is the highest valid value for type SymbolKind, plus one.
func SymbolKindValues ¶
func SymbolKindValues() []SymbolKind
SymbolKindValues returns all possible values for the type SymbolKind.
func (SymbolKind) Desc ¶
func (i SymbolKind) Desc() string
Desc returns the description of the SymbolKind value.
func (SymbolKind) Int64 ¶
func (i SymbolKind) Int64() int64
Int64 returns the SymbolKind value as an int64.
func (SymbolKind) MarshalText ¶
func (i SymbolKind) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*SymbolKind) SetInt64 ¶
func (i *SymbolKind) SetInt64(in int64)
SetInt64 sets the SymbolKind value from an int64.
func (*SymbolKind) SetString ¶
func (i *SymbolKind) SetString(s string) error
SetString sets the SymbolKind value from its string representation, and returns an error if the string is invalid.
func (SymbolKind) String ¶
func (i SymbolKind) String() string
String returns the string representation of this SymbolKind value.
func (*SymbolKind) UnmarshalText ¶
func (i *SymbolKind) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface.
func (SymbolKind) Values ¶
func (i SymbolKind) Values() []enums.Enum
Values returns all possible values for the type SymbolKind.