Skip to content

Allow opening the extends.file attribute of a service #172

@rcjsuen

Description

@rcjsuen
services:
  test2:
    extends:
      service: test
      file: ./compose.other.yaml

We should allow opening compose.other.yaml as a link. We will need to augment the textDocument/documentLink request for this. This should be achievable by modifying the code below to consider an extends object and then by reusing the types.AbsolutePath function. We can also reference what was done in createIncludeLink to create the appropriate link result.

case "services":
if mappingNode, ok := n.Value.(*ast.MappingNode); ok {
for _, node := range mappingNode.Values {
if serviceAttributes, ok := node.Value.(*ast.MappingNode); ok {
for _, serviceAttribute := range serviceAttributes.Values {
link := createImageLinks(serviceAttribute)
if link != nil {
links = append(links, *link)
}
}
}
}
}

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions