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

language specific editor.wordBasedSuggestions setting doesn't override the global setting #22680

Closed
StanislawStempin opened this issue Mar 15, 2017 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug suggest IntelliSense, Auto Complete verified Verification succeeded
Milestone

Comments

@StanislawStempin
Copy link

  • VSCode Version: 1.10.2
  • OS Version: Windows 10 1607 14393.693

Steps to Reproduce:

  1. Create a new empty folder and open it in VSCode
  2. In that folder - create a new xml file
  3. Open workspace settings and set the following settings:
    '''{
    "editor.wordBasedSuggestions": true,
    "[xml]": {
    "editor.wordBasedSuggestions": false
    }
    }
    '''
  4. Open the XML file, type a few words and press Ctrl+Space

Actual result:
Word based suggestions show up
Expected result:
No suggestions showing up

wordbasedsuggestions

@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug settings-editor VS Code settings editor issues labels Mar 16, 2017
@sandy081 sandy081 added this to the March 2017 milestone Mar 16, 2017
@sandy081 sandy081 modified the milestones: April 2017, March 2017 Mar 29, 2017
@sandy081 sandy081 assigned jrieken and unassigned sandy081 Apr 25, 2017
@sandy081 sandy081 added suggest IntelliSense, Auto Complete and removed settings-editor VS Code settings editor issues labels Apr 25, 2017
@sandy081
Copy link
Member

@jrieken Looks like wordBasedSuggestions config is being read without lang id.

@sandy081 sandy081 removed this from the April 2017 milestone Apr 25, 2017
@jrieken jrieken added this to the April 2017 milestone Apr 25, 2017
@jrieken
Copy link
Member

jrieken commented Apr 25, 2017

Please advise how @sandy081. There is nothing obvious on the service: const { wordBasedSuggestions } = this._configurationService.getConfiguration<IEditorOptions>('editor');

@sandy081
Copy link
Member

@jrieken Agreed, service api is not explicit. You can get language options as follows

this._configurationService.getConfiguration<IEditorOptions>({section: 'editor', overrideIdentifier: <langId>})

@sandy081
Copy link
Member

@jrieken Not sure why are we not getting editor settings from the editor instead of asking the service again?

@jrieken
Copy link
Member

jrieken commented Apr 26, 2017

Because this is done as service which isn't aware of an editor, just knowing models. That's how the API of a completion provider looks like.

@sandy081 sandy081 added the verified Verification succeeded label Apr 28, 2017
@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 suggest IntelliSense, Auto Complete verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants