You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your enhancement related to a problem? Please describe.
yaml-language-server turns JSON pointer references into links based on vscode-json-languageservice. YAML has a native support to references though: anchors. It makes sense to support anchors instead of or in addition to JSON pointers.
Describe the solution you would like
The links provider should provide links for anchors. The solution is fairly simple. In src/languageservice/services/yamlLinks.ts:
Iterate over the AST
Register an anchor by name if found
Create a link to an anchor when an anchor id is found
Do this for every SingleYAMLDocument.
Describe alternatives you have considered
N/A
Additional context
I tried this. yaml-language-server-parser supports anchors, but the conversion to the vscode-json-languageservice compatible AST removes all anchors and anchor references. I tried adding it, but it doesn’t really have a good place inside this AST format.
It’s probably best to wait for the new AST format introduced in #442
The text was updated successfully, but these errors were encountered:
Is your enhancement related to a problem? Please describe.
yaml-language-server
turns JSON pointer references into links based onvscode-json-languageservice
. YAML has a native support to references though: anchors. It makes sense to support anchors instead of or in addition to JSON pointers.Describe the solution you would like
The links provider should provide links for anchors. The solution is fairly simple. In
src/languageservice/services/yamlLinks.ts
:Do this for every
SingleYAMLDocument
.Describe alternatives you have considered
N/A
Additional context
I tried this.
yaml-language-server-parser
supports anchors, but the conversion to thevscode-json-languageservice
compatible AST removes all anchors and anchor references. I tried adding it, but it doesn’t really have a good place inside this AST format.It’s probably best to wait for the new AST format introduced in #442
The text was updated successfully, but these errors were encountered: