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

customData attributes are not being picked up by IntelliSense #111

Open
dumptyd opened this issue Jul 18, 2021 · 3 comments
Open

customData attributes are not being picked up by IntelliSense #111

dumptyd opened this issue Jul 18, 2021 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@dumptyd
Copy link

dumptyd commented Jul 18, 2021

Setup Attribute autocompletion ✅ Value autocompletion ❌
image image image

Things I've tried so far:

  • Providing the values using the values and valueSet properties, together and individually.
  • Restarting VSCode.
  • Restarting VSCode with extensions disabled.
  • Changing version to 1.
  • Using a tag and then assigning the values and valueSet to it (together and individually). (This worked!)

I want to extend IntelliSense with some global class names so they're suggested when typing <any-html-tag class=" along with other default suggestions. Is this the right way to achieve this?


Side-note: Changes to the config are not picked up until I restart vscode or change the value of html.customData to something else and then change it back to the real path.

@aeschli
Copy link
Contributor

aeschli commented Oct 25, 2021

Can you attach the data.json file?

@aeschli aeschli added the info-needed Issue requires more information from poster label Oct 25, 2021
@aeschli aeschli self-assigned this Oct 25, 2021
@dumptyd
Copy link
Author

dumptyd commented Oct 25, 2021

Sure, I'm including it for documentation purposes but I just tried my own example again and seems like this was fixed somewhere along the way and it's now working as expected. (Most likely here: 77e4483)

html.html-data.json
{
  "version": 1.1,
  "globalAttributes": [
    {
      "name": "class",
      "description": "Hello, world!",
      "valueSet": "customValues",
      "values": [
        { "name": "val-1", "description": "Value 1" }
      ]
    }
  ],
  "valueSets": [
    {
      "name": "customValues",
      "values": [
        { "name": "val-2", "description": "Value 2" }
      ]
    }
  ]
}

I want to extend IntelliSense with some global class names so they're suggested when typing <any-html-tag class=" along with other default suggestions. Is this the right way to achieve this?

Regarding this, I tried it with class attribute and it works but it gets rid of all the other suggestions. Is it possible to extend the existing suggestions list with my own rather than overriding it?

Without html-data.json With html-data.json
image image

@aeschli
Copy link
Contributor

aeschli commented Oct 25, 2021

The completions from the first screenshots are textual proposals gathered from the words that occur in the document. They are used by VS Code as fallback when there are no proposals from the language service.
We would have to reimplement that in the language service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants