Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: htmlLanguageParticipants contribution point #156200

Closed
2 tasks done
aeschli opened this issue Jul 25, 2022 · 4 comments
Closed
2 tasks done

Test: htmlLanguageParticipants contribution point #156200

aeschli opened this issue Jul 25, 2022 · 4 comments

Comments

@aeschli
Copy link
Contributor

aeschli commented Jul 25, 2022

Refs: #146730

Complexity: 3

Create Issue


The html language support now supports a new contribution point that allows other languages to participate in the html language server features.

   "htmlLanguageParticipants": [
      {
        "languageId": "handlebars"
      }
    ]

In the samp,e above, the handlebars language registers to get all HTML features.

  • Test that a handlebars file gets code completion, hovers...

  • Set "html.trace.server": "messages" in the settings

  • Disable the handlebar basic extension (Handlebars Language Basics), find it with @builtin handlebar

  • Test that a handlebars file no longer get code completion, hovers.

  • Verify that the HTML Language Server output view contains the log entry Extensions have changed, restarting HTML server...

  • Open vscode repo and open the package.json from the handlebars extension

  • Verify that you get hovers and code completions for the htmlLanguageParticipants contribution point

@tanhakabir
Copy link
Contributor

"htmlLanguageParticipants": [
      {
        "languageId": "handlebars"
      }
    ]

This setting doesn't seem to be active for me. Is there somewhere else I should be using this instead of inside user settings?

@aeschli
Copy link
Contributor Author

aeschli commented Jul 27, 2022

@tanhakabir It's a contribution point for 'package.json'. Example is here:

"htmlLanguageParticipants": [

@angelozerr
Copy link
Contributor

@aeschli I tested on Windows OS, and everything works perfectly.

As you report custom message like Extensions have changed, restarting HTML server..., I think it could be a good idea to report when HTML language server is started/restarted the list of htmlLanguageParticipants. It can be helpfull for custom extension to check that the custom language is registered as htmlLanguageParticipants.

And just for your information, we use this html language participant with our Qute support #146731 (comment) and it works perfectly.

@aeschli
Copy link
Contributor Author

aeschli commented Jul 27, 2022

Thanks @angelozerr, good suggestion. I'll add it when I'm back from vacation...

@tanhakabir tanhakabir removed their assignment Jul 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants