Documentation ¶
Index ¶
- Constants
- type CompletionItem
- type Token
- type TokensAtPosition
- func (t *TokensAtPosition) EndOfBlock() *TokensAtPosition
- func (t *TokensAtPosition) EndOfGroup(start string, end string) *TokensAtPosition
- func (t *TokensAtPosition) EndOfParen() *TokensAtPosition
- func (t *TokensAtPosition) FindPrev(value string) *TokensAtPosition
- func (t *TokensAtPosition) FindPrevMultiple(values ...string) (string, *TokensAtPosition)
- func (t *TokensAtPosition) FindPrevMultipleOnLine(values ...string) (string, *TokensAtPosition)
- func (t *TokensAtPosition) FindPrevOnLine(value string) *TokensAtPosition
- func (t *TokensAtPosition) FindPrevOnLineAt(value string, offset int) *TokensAtPosition
- func (t *TokensAtPosition) Is(others ...*TokensAtPosition) bool
- func (t *TokensAtPosition) IsNewLine() bool
- func (t *TokensAtPosition) Line() int
- func (t *TokensAtPosition) LineAt(offset int) int
- func (t *TokensAtPosition) Next() *TokensAtPosition
- func (t *TokensAtPosition) Prev() *TokensAtPosition
- func (t *TokensAtPosition) Start() *TokensAtPosition
- func (t *TokensAtPosition) StartOfBlock() *TokensAtPosition
- func (t *TokensAtPosition) StartOfGroup(start string, end string) *TokensAtPosition
- func (t *TokensAtPosition) StartOfParen() *TokensAtPosition
- func (t *TokensAtPosition) Value() string
- func (t *TokensAtPosition) ValueAt(offset int) string
Constants ¶
View Source
const ( KindModel = "model" KindField = "field" KindVariable = "variable" KindType = "type" KindKeyword = "keyword" KindLabel = "label" KindAttribute = "attribute" KindPunctuation = "punctuation" KindInput = "inputs" )
View Source
const (
DescriptionSuggested = "Suggested"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletionItem ¶
type CompletionItem struct { Label string `json:"label"` Description string `json:"description"` Kind string `json:"kind"` // If empty use `Label` InsertText string `json:"insertText"` }
func Completions ¶
func Completions(schemaFiles []*reader.SchemaFile, pos *node.Position, cfg *config.ProjectConfig) []*CompletionItem
type TokensAtPosition ¶
type TokensAtPosition struct {
// contains filtered or unexported fields
}
TokensAtPosition represents a list of tokens with a current position The position should be considered immutable for each TokensAtPosition instance.
func NewTokensAtPosition ¶
func NewTokensAtPosition(schema string, pos *node.Position) *TokensAtPosition
func (*TokensAtPosition) EndOfBlock ¶
func (t *TokensAtPosition) EndOfBlock() *TokensAtPosition
func (*TokensAtPosition) EndOfGroup ¶
func (t *TokensAtPosition) EndOfGroup(start string, end string) *TokensAtPosition
func (*TokensAtPosition) EndOfParen ¶
func (t *TokensAtPosition) EndOfParen() *TokensAtPosition
func (*TokensAtPosition) FindPrev ¶
func (t *TokensAtPosition) FindPrev(value string) *TokensAtPosition
func (*TokensAtPosition) FindPrevMultiple ¶
func (t *TokensAtPosition) FindPrevMultiple(values ...string) (string, *TokensAtPosition)
func (*TokensAtPosition) FindPrevMultipleOnLine ¶
func (t *TokensAtPosition) FindPrevMultipleOnLine(values ...string) (string, *TokensAtPosition)
func (*TokensAtPosition) FindPrevOnLine ¶
func (t *TokensAtPosition) FindPrevOnLine(value string) *TokensAtPosition
* * Find a previous token with a given value on the same line as the current token *
func (*TokensAtPosition) FindPrevOnLineAt ¶
func (t *TokensAtPosition) FindPrevOnLineAt(value string, offset int) *TokensAtPosition
* * Find a previous token with a given value on the same line the given offset *
func (*TokensAtPosition) Is ¶
func (t *TokensAtPosition) Is(others ...*TokensAtPosition) bool
func (*TokensAtPosition) IsNewLine ¶
func (t *TokensAtPosition) IsNewLine() bool
* * Returns true of the current token is at the beginning of a new line *
func (*TokensAtPosition) Line ¶
func (t *TokensAtPosition) Line() int
func (*TokensAtPosition) LineAt ¶
func (t *TokensAtPosition) LineAt(offset int) int
func (*TokensAtPosition) Next ¶
func (t *TokensAtPosition) Next() *TokensAtPosition
func (*TokensAtPosition) Prev ¶
func (t *TokensAtPosition) Prev() *TokensAtPosition
func (*TokensAtPosition) Start ¶
func (t *TokensAtPosition) Start() *TokensAtPosition
func (*TokensAtPosition) StartOfBlock ¶
func (t *TokensAtPosition) StartOfBlock() *TokensAtPosition
func (*TokensAtPosition) StartOfGroup ¶
func (t *TokensAtPosition) StartOfGroup(start string, end string) *TokensAtPosition
func (*TokensAtPosition) StartOfParen ¶
func (t *TokensAtPosition) StartOfParen() *TokensAtPosition
func (*TokensAtPosition) Value ¶
func (t *TokensAtPosition) Value() string
func (*TokensAtPosition) ValueAt ¶
func (t *TokensAtPosition) ValueAt(offset int) string
Click to show internal directories.
Click to hide internal directories.