-
Notifications
You must be signed in to change notification settings - Fork 58
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
Auto-discovered HXML takes higher priority than settings.json #295
Comments
Hm.. I remember this being an issue, but I can't reproduce it anymore - when I open a freshly cloned OpenFL repo, Do you see different results? |
I recently re-installed Visual Studio Code, and this occurred, but perhaps (?) it's possible that it defaults differently, and this machine had residual settings to save the default as being the wrong choice. Is there code in the plugin that decides which to favor? |
Not explicitly, but the default configuration index is 0:
And the list of configurations is constructed in such a way that configured ones come first, then discovered ones: vshaxe/src/vshaxe/display/HaxeDisplayArgumentsProvider.hx Lines 49 to 71 in 0876fad
|
Okay, so perhaps this was saved somewhere. I'll comment again if this seems not to be the case, but there's a high likelihood that I did use VSCode to open the OpenFL directory before, and this workspace setting might have been saved already. Although, now that I think about it, one other question -- If a user opens a project with only auto-discovered options, and does not choose it themselves, will it save the auto-selected setting, or will it remain unsaved until they change it themselves? Might be good not to save a setting if they don't make one themselves, so if the default improves over time for a library, they benefit immediately |
That should already be the case, nothing is saved unless the user explicitly selects something in the UI. |
Hm, actually, the code doesn't seem to be making that distinction... I might be thinking of completion providers. |
In OpenFL, VSHaxe finds two "auto-discovered" HXML files for completion, but OpenFL also includes a settings.json to specify exactly the completion parameters that should be used when updating the library.
The workspace (as I understand) does remember which option you select, but initially, it appears to select one of the auto-discovered files first (perhaps alphabetically?)
I think completion defined in the workspace settings.json should take higher priority by default. Thank you 😄
The text was updated successfully, but these errors were encountered: