Documentation
¶
Index ¶
- func FindDirectChildNodeByStart(currentNode *sitter.Node, pointToLookUp sitter.Point) *sitter.Node
- func FindRelevantChildNode(currentNode *sitter.Node, pointToLookUp sitter.Point) *sitter.Node
- func GetDiagnosticFromLinterErr(supMsg support.Message) (*lsp.Diagnostic, string, error)
- func GetDiagnostics(uri uri.URI, vals chartutil.Values) []lsp.Diagnostic
- func GetDiagnosticsNotification(chart *charts.Chart, doc *Document) *lsp.PublishDiagnosticsParams
- func GetFieldIdentifierPath(node *sitter.Node, doc *Document) (path string)
- func GetLspRangeForNode(node *sitter.Node) lsp.Range
- func GetSitterPointForLspPos(pos lsp.Position) sitter.Point
- func GetVariableDefinition(variableName string, node *sitter.Node, template string) *sitter.Node
- func GetVariableDefinitionOfNode(node *sitter.Node, template string) *sitter.Node
- func IsInElseBranch(node *sitter.Node) bool
- func NodeAtPosition(tree *sitter.Tree, position lsp.Position) *sitter.Node
- func ParseAst(oldTree *sitter.Tree, content string) *sitter.Tree
- func TraverseIdentifierPathUp(node *sitter.Node, doc *Document) string
- func TrimTemplate(gotemplateTree *sitter.Tree, content string) string
- type DiagnosticsCache
- type Document
- type DocumentStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindDirectChildNodeByStart ¶ added in v0.0.8
func FindRelevantChildNode ¶ added in v0.0.6
func GetDiagnostics ¶
GetDiagnostics will run helm linter against the currect document URI using the given values and converts the helm.support.Message to lsp.Diagnostics
func GetDiagnosticsNotification ¶ added in v0.0.13
func GetDiagnosticsNotification(chart *charts.Chart, doc *Document) *lsp.PublishDiagnosticsParams
func GetFieldIdentifierPath ¶ added in v0.0.4
func GetSitterPointForLspPos ¶ added in v0.0.8
func GetVariableDefinition ¶ added in v0.0.6
func GetVariableDefinitionOfNode ¶ added in v0.0.6
func IsInElseBranch ¶ added in v0.0.8
func NodeAtPosition ¶ added in v0.0.4
func TraverseIdentifierPathUp ¶ added in v0.0.4
Types ¶
type DiagnosticsCache ¶ added in v0.0.8
type DiagnosticsCache struct {
YamlDiagnostics []lsp.Diagnostic
HelmDiagnostics []lsp.Diagnostic
// contains filtered or unexported fields
}
func NewDiagnosticsCache ¶ added in v0.0.8
func NewDiagnosticsCache(helmlsConfig util.HelmlsConfiguration) DiagnosticsCache
func (DiagnosticsCache) GetMergedDiagnostics ¶ added in v0.0.8
func (d DiagnosticsCache) GetMergedDiagnostics() (merged []lsp.Diagnostic)
func (*DiagnosticsCache) SetYamlDiagnostics ¶ added in v0.0.8
func (d *DiagnosticsCache) SetYamlDiagnostics(diagnostics []lsp.Diagnostic)
func (*DiagnosticsCache) ShouldShowDiagnosticsOnNewYamlDiagnostics ¶ added in v0.0.8
func (d *DiagnosticsCache) ShouldShowDiagnosticsOnNewYamlDiagnostics() bool
type Document ¶ added in v0.0.5
type Document struct {
URI lsp.DocumentURI
Path string
NeedsRefreshDiagnostics bool
Content string
Ast *sitter.Tree
DiagnosticsCache DiagnosticsCache
// contains filtered or unexported fields
}
Document represents an opened file.
func (*Document) ApplyChanges ¶ added in v0.0.5
func (d *Document) ApplyChanges(changes []lsp.TextDocumentContentChangeEvent)
ApplyChanges updates the content of the document from LSP textDocument/didChange events.
func (*Document) ApplyChangesToAst ¶ added in v0.0.5
type DocumentStore ¶
type DocumentStore struct {
// contains filtered or unexported fields
}
documentStore holds opened documents.
func NewDocumentStore ¶
func NewDocumentStore() *DocumentStore
func (*DocumentStore) DidOpen ¶
func (s *DocumentStore) DidOpen(params *lsp.DidOpenTextDocumentParams, helmlsConfig util.HelmlsConfiguration) (*Document, error)
func (*DocumentStore) GetAllDocs ¶ added in v0.0.8
func (s *DocumentStore) GetAllDocs() []*Document
Click to show internal directories.
Click to hide internal directories.