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

Textual proposals get same score as JSON proposals #6628

Closed
aeschli opened this issue May 22, 2016 · 7 comments
Closed

Textual proposals get same score as JSON proposals #6628

aeschli opened this issue May 22, 2016 · 7 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Milestone

Comments

@aeschli
Copy link
Contributor

aeschli commented May 22, 2016

  • settings file, copy over some settings, do auto complete:
    image
    -> when scrolling down multiple pages, one can see some real settings.

Problem is that text proposals are contribted for language selector 'json' and get the same score as the proposals from the mode.

Likely caused by @alexandrudima change in 41302ca

@aeschli aeschli added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority labels May 22, 2016
@jrieken jrieken assigned alexdima and unassigned jrieken May 23, 2016
@jrieken jrieken added this to the May 2016 milestone May 23, 2016
@jrieken
Copy link
Member

jrieken commented May 23, 2016

@alexandrudima Can you point to me the registration?

@alexdima
Copy link
Member

@jrieken Maybe this is caused by using the registries and no longer using suggestSupport. Should we add a weight property on registration?

Here is the default textual completion: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/modes/abstractMode.ts#L233

@alexdima
Copy link
Member

I also suggest using find all references on SuggestRegistry, maybe other places need to have a lower weight?

@jrieken
Copy link
Member

jrieken commented May 23, 2016

I don't like the weight option. I would register for the * language which results in a lower score: https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/modes/languageSelector.ts#L34

@alexdima
Copy link
Member

Thank you @aeschli !

@aeschli
Copy link
Contributor Author

aeschli commented May 23, 2016

Hm, I kind of expected an easier fix. The problem of the higher score is that the TextualSuggestSupport is contributed for every mode id.

modes.SuggestRegistry.register(this.getId(), new TextualSuggestSupport(this.getId(), editorWorkerService, configurationService));

If you would just contribute a single time for '*', it would get the score it had before
Also it seems the TextualSuggestSupport doesn't really need to know the mode id.

@jrieken
Copy link
Member

jrieken commented May 23, 2016

Actually, the problem is bigger than textual suggestion. Basically, all language features that don't work with merging results (suggest, formatting, etc) were affected cos before they were known to be coming from a built-in language and getting the lowest score. For instance, an extension adding/replacing formatting for html would be broken by that change. That's why we restored the old implicit knowledge.

Once, everything moves to the extension host, the problem goes away because you top the score by coming later which you do by taking an ext-dependency

@alexdima alexdima assigned aeschli and unassigned alexdima May 27, 2016
@aeschli aeschli added the verified Verification succeeded label May 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants