Documentation
¶
Index ¶
- Constants
- Variables
- func CalculateBlockLocation(definitionLinkSupport bool, input []byte, body *hclsyntax.Body, ...) any
- func CodeLens(ctx context.Context, filename string, doc document.BakeHCLDocument) ([]protocol.CodeLens, error)
- func Completion(ctx context.Context, params *protocol.CompletionParams, ...) (*protocol.CompletionList, error)
- func Definition(ctx context.Context, definitionLinkSupport bool, manager *document.Manager, ...) (any, error)
- func DocumentHighlight(document document.BakeHCLDocument, position protocol.Position) ([]protocol.DocumentHighlight, error)
- func DocumentLink(ctx context.Context, documentURI protocol.URI, ...) ([]protocol.DocumentLink, error)
- func DocumentSymbol(ctx context.Context, filename string, doc document.BakeHCLDocument) (result []any, err error)
- func Formatting(doc document.BakeHCLDocument, options protocol.FormattingOptions) ([]protocol.TextEdit, error)
- func Hover(ctx context.Context, params *protocol.HoverParams, ...) (*protocol.Hover, error)
- func InlayHint(docs *document.Manager, doc document.BakeHCLDocument, rng protocol.Range) ([]protocol.InlayHint, error)
- func InlineCompletion(ctx context.Context, params *protocol.InlineCompletionParams, ...) ([]protocol.InlineCompletionItem, error)
- func LiteralValue(expr hclsyntax.Expression) bool
- func LocalDockerfile(u *url.URL) (string, error)
- func NewBakeHCLDiagnosticsCollector(docs *document.Manager, scout scout.Service) textdocument.DiagnosticsCollector
- func OpenDockerfile(ctx context.Context, manager *document.Manager, path string) ([]byte, []*parser.Node)
- func ParseDockerfile(dockerfilePath string) ([]byte, *parser.Result, error)
- func Quoted(s string) bool
- func ResolveAttributeValue(ctx context.Context, definitionLinkSupport bool, manager *document.Manager, ...) any
- func ResolveExpression(ctx context.Context, definitionLinkSupport bool, manager *document.Manager, ...) any
- func SemanticTokenTypeIndex(tokenType string) uint32
- func SemanticTokensFull(ctx context.Context, doc document.BakeHCLDocument, filename string) (*protocol.SemanticTokens, error)
- func TokenType(hclType lang.SemanticTokenType) uint32
- func UnwrapToHCL(err error) hcl.Diagnostics
- type BakeHCLDiagnosticsCollector
- type BakePrintOutput
Constants ¶
View Source
const TokenType_Class = "class"
View Source
const TokenType_Comment = "comment"
View Source
const TokenType_Keyword = "keyword"
View Source
const TokenType_Number = "number"
View Source
const TokenType_Operator = "operator"
View Source
const TokenType_Property = "property"
View Source
const TokenType_String = "string"
View Source
const TokenType_Type = "type"
View Source
const TokenType_Variable = "variable"
Variables ¶
View Source
var SemanticTokenTypes = []string{ TokenType_Type, TokenType_Class, TokenType_String, TokenType_Variable, TokenType_Property, TokenType_Keyword, TokenType_Operator, TokenType_Number, TokenType_Comment, }
SemanticTokenTypes is the list of semantic token types that the language server supports and will be included in the capabilities response payload to the client's initialize request.
Functions ¶
func CalculateBlockLocation ¶
func CalculateBlockLocation(definitionLinkSupport bool, input []byte, body *hclsyntax.Body, documentURI uri.URI, sourceRange hcl.Range, blockName, name string, variable bool) any
CalculateBlockLocation finds a block with the specified name and returns it. If variable is true then it will also look at the top-level attributes of the HCL file and resolve to those if the names match.
func Completion ¶
func Completion(ctx context.Context, params *protocol.CompletionParams, manager *document.Manager, document document.BakeHCLDocument) (*protocol.CompletionList, error)
func Definition ¶
func DocumentHighlight ¶
func DocumentHighlight(document document.BakeHCLDocument, position protocol.Position) ([]protocol.DocumentHighlight, error)
func DocumentLink ¶
func DocumentLink(ctx context.Context, documentURI protocol.URI, document document.BakeHCLDocument) ([]protocol.DocumentLink, error)
func DocumentSymbol ¶
func Formatting ¶
func Formatting(doc document.BakeHCLDocument, options protocol.FormattingOptions) ([]protocol.TextEdit, error)
func Hover ¶
func Hover(ctx context.Context, params *protocol.HoverParams, document document.BakeHCLDocument) (*protocol.Hover, error)
func InlineCompletion ¶
func InlineCompletion(ctx context.Context, params *protocol.InlineCompletionParams, manager *document.Manager, document document.BakeHCLDocument) ([]protocol.InlineCompletionItem, error)
func LiteralValue ¶
func LiteralValue(expr hclsyntax.Expression) bool
func NewBakeHCLDiagnosticsCollector ¶
func NewBakeHCLDiagnosticsCollector(docs *document.Manager, scout scout.Service) textdocument.DiagnosticsCollector
func OpenDockerfile ¶
func ResolveAttributeValue ¶
func ResolveExpression ¶
func SemanticTokenTypeIndex ¶
func SemanticTokensFull ¶
func SemanticTokensFull(ctx context.Context, doc document.BakeHCLDocument, filename string) (*protocol.SemanticTokens, error)
func TokenType ¶
func TokenType(hclType lang.SemanticTokenType) uint32
func UnwrapToHCL ¶
func UnwrapToHCL(err error) hcl.Diagnostics
Types ¶
type BakeHCLDiagnosticsCollector ¶
type BakeHCLDiagnosticsCollector struct {
// contains filtered or unexported fields
}
func (*BakeHCLDiagnosticsCollector) CollectDiagnostics ¶
func (c *BakeHCLDiagnosticsCollector) CollectDiagnostics(source, workspaceFolder string, doc document.Document, text string) []protocol.Diagnostic
func (*BakeHCLDiagnosticsCollector) SupportsLanguageIdentifier ¶
func (c *BakeHCLDiagnosticsCollector) SupportsLanguageIdentifier(languageIdentifier protocol.LanguageIdentifier) bool
Source Files
¶
Click to show internal directories.
Click to hide internal directories.