Documentation ¶
Index ¶
- Constants
- func IdentParameter(v StringMap, parent interface{}) *identParam
- type CompletionCandidate
- type Document
- type File
- func (f *File) Completions(pos protocol.Position) []fmt.Stringer
- func (f *File) Definition(pos protocol.Position) *protocol.Location
- func (f *File) Diagnostics() []protocol.Diagnostic
- func (f *File) FindReferences(pos protocol.Position) []protocol.Location
- func (f *File) Hover(pos protocol.Position) *string
- func (f *File) PrepareRename(pos protocol.Position) *protocol.Location
- func (f *File) Rename(pos protocol.Position, newName string) (*protocol.WorkspaceEdit, error)
- type IdentResult
- type IdentTask
- type IdentWorkspace
- type Meta
- type PipelineTask
- type StringMap
- type Workspace
- func (w *Workspace) AddFolder(uri string)
- func (w *Workspace) Diagnostics(cb func(protocol.PublishDiagnosticsParams))
- func (w *Workspace) File(uri string) *File
- func (w *Workspace) FindReferences(docUri string, pos protocol.Position) []protocol.Location
- func (w *Workspace) Lint()
- func (w *Workspace) Rename(docUri string, pos protocol.Position, newName string) (*protocol.WorkspaceEdit, error)
- func (w *Workspace) UpsertFile(uri string, text string)
Constants ¶
const ( IdentKindParam identifierKind = iota IdentKindResult IdentKindWorkspace IdentKindPipelineTask IdentKindTask )
Variables ¶
This section is empty.
Functions ¶
func IdentParameter ¶
func IdentParameter(v StringMap, parent interface{}) *identParam
Types ¶
type CompletionCandidate ¶
type CompletionCandidate struct { // Text is the completion to be suggested. Text string // Value is the Tekton object to which the completion refers. Value Meta }
CompletionCandidate holds the text of a completion and the Tekton object to which it refers.
func (CompletionCandidate) String ¶
func (c CompletionCandidate) String() string
String implements fmt.Stringer for CompletionCandidate.
type Document ¶
type Document struct { // TextDocument is the LSP TextDocument which contains this document. file.TextDocument // contains filtered or unexported fields }
Document provides operation on a single YAML document containing a Tekton resource.
type File ¶
type File struct { // TextDocument of this file. file.TextDocument // contains filtered or unexported fields }
File provides operation on a YAML file containing any number of Tekton Documents - separated by `---` as defined by the YAML spec.
func NewFile ¶
func NewFile(f file.TextDocument) *File
NewFile sanitizes a TextDocument, parses its YAML contents into an AST, and calculates the offset and size of every YAML document in the file.
func (*File) Completions ¶
Completions returns a list of completion suggestions for the given position.
func (*File) Definition ¶
Definition returns the Location where the identifier in the given position is defined, or nil if no identifier is found.
func (*File) Diagnostics ¶
func (f *File) Diagnostics() []protocol.Diagnostic
Diagnostics returns a list of Diagnostics issues found in this File.
func (*File) FindReferences ¶
FindReferences returns a list of all Locations which refer to the identifier in the given position, or nil if no identifier is found.
func (*File) Hover ¶
Hover returns a pointer to a string containing the Documentation of the Tekton object in the given position, or nil if no reference is found.
func (*File) PrepareRename ¶
PrepareRename returns the Location (File, Range) that should be edited if a Rename request is made at the given position. It should return nil if it's not a valid position for a rename request, that is, if no identifier is found at the given position.
type IdentResult ¶
type IdentResult StringMap
func (IdentResult) Completions ¶
func (p IdentResult) Completions() []completion
func (IdentResult) Description ¶
func (p IdentResult) Description() string
func (IdentResult) Documentation ¶
func (p IdentResult) Documentation() string
func (IdentResult) Name ¶
func (p IdentResult) Name() string
type IdentTask ¶
type IdentTask StringMap
func (IdentTask) Completions ¶
func (p IdentTask) Completions() []completion
func (IdentTask) Documentation ¶
type IdentWorkspace ¶
type IdentWorkspace StringMap
func (IdentWorkspace) Completions ¶
func (p IdentWorkspace) Completions() []completion
func (IdentWorkspace) Description ¶
func (p IdentWorkspace) Description() string
func (IdentWorkspace) Documentation ¶
func (p IdentWorkspace) Documentation() string
func (IdentWorkspace) Name ¶
func (p IdentWorkspace) Name() string
type Meta ¶
type Meta interface { // Name returns the name of the given Tekton object. Name() string // Documentation returns the Markdown documentation of the given Tekton // object. Documentation() string // Completions returns a list of possible completion suggestions // associated with the Tekton object. Completions() []completion }
Meta is the root interface for any given Tekton object understood by this language server.
type PipelineTask ¶
type PipelineTask StringMap
func (PipelineTask) Completions ¶
func (p PipelineTask) Completions() []completion
func (PipelineTask) Documentation ¶
func (p PipelineTask) Documentation() string
func (PipelineTask) Name ¶
func (p PipelineTask) Name() string
type Workspace ¶
type Workspace struct {
// contains filtered or unexported fields
}
func NewWorkspace ¶
func NewWorkspace() *Workspace
func (*Workspace) Diagnostics ¶
func (w *Workspace) Diagnostics(cb func(protocol.PublishDiagnosticsParams))