vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Auto-completion by context

Open sbwoodside opened this issue 8 years ago • 3 comments

Would it be possible to have auto-completion based on the YAML context. For example, if I'm typing a key in an associative array, it would complete based on other keys, if I'm typing a value, other values, etc?

sbwoodside avatar Jul 01 '17 05:07 sbwoodside

Yes, it would be possible. The JSON implementation could be used as a reference for seeing how to interact with the Schema to get suggestions. The Language Server Protocol document is probably the best source for documentation on how the completion API works to know what needs to be implemented.

adamvoss avatar Jul 01 '17 05:07 adamvoss

I know this is hard to implement because parser probably doesn't provide enough information while in the middle of editing but it would be very useful feature.

vojtechhabarta avatar Sep 13 '17 11:09 vojtechhabarta

@sbwoodside @vojtechhabarta In our extension https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml we have this feature implemented if you want to try it out.

JPinkney avatar Oct 26 '17 19:10 JPinkney