-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Alloy XML autocompletion | suggestion issue #151
Comments
@jason919 Could you please provide a reproducible test case? Without one, this bug report is a timesink for us to figure out how many attributes "many attributes" is. |
This issue happens to any dummy project. For example, you can create a dummy project with a single index.xml. And replace it with below, then you can place your cursor at <ImageView tag, hit ctrl+space, you will see it hanging at "loading". Then you can try the ctrl+space on other Tags too. It seems like any Tag with 3 attributes will have a problem, anything with just 2 attributes is ok.
|
As I mentioned, the problem is with having the attributes directly inside the XML tag, if i move those attributes to tss, it works fine. Is it possible that we can have a shortcut to move all the attributes to tss for a Tag automatically? |
can anyone help point out where the code that manages the autocomplete for Alloy xml? |
@jason919 The provider logic lives under src/providers/ and then the providers for xml files start with view. I think I've tried reproducing what you're seeing. I think it's partially expected although I can't reproduce the hanging you describe and I'm making the presumption that you don't have an i18n directory. What's happening is as you're triggering intellisense outside of the tag we're falling back to the default action of providing i18n completions, that function, only resolves if the If you'd like to take this issue I'd be more than happy to help you in making the PR, just let me know! |
I added the i18n folder, it still didn't help. |
@jason919, did you create a i18n file with content? i.e. I think for the new case, you're hitting a design problem with the autocomplete setup where we generate Alloy tags based off the parsers directory in alloy, there isn't a parser for As for |
I noticed that if the Alloy XML tag has many attributes inside XML, instead of inside tss, then when I hit "ctrl+space", the suggestion is just hanging in "Loading" state. If that happens, all other autocompletion in other XML tags will be hanging. The only way to get out of this is to restart VS code.
The text was updated successfully, but these errors were encountered: