redhat-developer / yaml-language-server

Language Server for YAML Files
MIT License
1.1k stars 264 forks source link

Can't trigger code completions with a period "." character #904

Closed hario90 closed 1 year ago

hario90 commented 1 year ago

Describe the bug

Code completions defined within a custom VS Code extension don't appear when the trigger character is a period when the RedHat YAML extension is enabled. They appear again when the RedHat YAML extension is turned off.

Expected Behavior

Code completions for "console." should appear, displaying "log", "info" and "error"

Current Behavior

Code completions don't appear.

Steps to Reproduce

  1. Clone https://github.com/microsoft/vscode-extension-samples and open completions-sample folder VS Code
  2. In completions-sample/src/extension.ts, find all instances of 'plaintext' and change to { scheme: 'file', language: 'yaml' }.
  3. Run npm install in completions-sample folder (see root README for NPM and NodeJS version requirements).
  4. Hit F5 (to run the extension)
  5. In the Extension Development Host that opens up, make sure RedHat YAML extension is installed and enabled
  6. Open or create a YAML file (e.g. test.yaml).
  7. Type "CTRL + SHIFT + P" and select "Trigger Select"
  8. You should see "console" in the suggestions. Type "." to select this option.

This issue doesn't happen when the RedHat YAML extension is disabled.

yaml-code-completion

Environment

yaml-code-completion

hario90 commented 1 year ago

I believe this is related to https://github.com/microsoft/vscode/issues/130953 in which the author was unable to use '.' as a trigger character without downgrading VS Code or disabling the RedHat YAML extension. The issue was closed because the VS Code side was working as intended.

hario90 commented 1 year ago

Opening a bug in the vscode-yaml repo since this may not be specific to the language server.