vscode-yaml
vscode-yaml copied to clipboard
VSCode extension yaml auto-complete not working in vscode 1.43.1 and yaml extension 0.7.2
I am testing vscode 1.43.1 example from here and have some issues. When I set registerCompletionItemProvider language option to "yaml", the auto complete item results not showing anymore until I uninstall the yaml extension. It worked on vscode 1.42.1 with yaml extension. Does anybody encounter the same issue?
I also ask this problem in vscode github: https://github.com/microsoft/vscode/issues/93279#issue-586666956
- VSCode Version: 1.43.1
- OS Version: Mac os mojave 10.14.5
- YAML Extension Version: 0.7.2
Steps to Reproduce:
- Install YAML extension.
- Using vscode-extension-sample: completions. The trigger character is
.
, and I modify the language from plaintext to yaml. - Run it and open an empty yaml file, then keying
console.
.
Input console.
in the empty yaml file. There has no item to show.
When I disable YAML extension, it seems work.
Hmm, I'm not sure what is causing this. I thought that VSCode would look for all language contributions for a specific filetype and then join them all together. We aren't doing anything special here that should cause it 🤷♂
Can you try this with something like the vscode java extension and try registering it as java and see what happens?
I've also encountered this issue (here). I might try digging into vscode a bit to see what's up, but as far as I can tell (and I'm relatively new to vscode extensions so forgive me) registerCompletionItemProvider()
isn't being used in favour of LanguageClient
. My current assumption is that https://github.com/microsoft/vscode-languageserver-node somehow overrides the completions from other extensions.
I suspect that's because of wordPattern
https://github.com/redhat-developer/vscode-yaml/blob/main/language-configuration.json#L37
Did someone find a solution?