lsp

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: BSD-3-Clause Imports: 2 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 parse.

Index

Constants

This section is empty.

Variables

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 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.

Jump to

Keyboard shortcuts

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