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

Intelli-sense in extensions file #26564

Merged
merged 5 commits into from
May 17, 2017
Merged

Intelli-sense in extensions file #26564

merged 5 commits into from
May 17, 2017

Conversation

teintinu
Copy link
Contributor

@teintinu teintinu commented May 12, 2017

Intellisense for extensions.json providing installed extensions
from issue #12744

  • Still suggesting examples. Useful when there are no installed extensions

@mention-bot
Copy link

@thr0w, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jrieken and @bpasero to be potential reviewers.

@msftclas
Copy link

@thr0w,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by Microsoft. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
if (location.path[0] === 'recommendations') {
return vscode.extensions.all
.filter(e => !e.id.startsWith('vscode.'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • You also need to exclude following extension which is packaged along with VS Code - Microsoft.vscode-markdown. This was getting shown in the intelli-sense.

  • Intelli-sense should not show already entered extensions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandy081

  • Excluded Microsoft.vscode-markdown. Can I exclude all packages starting with Microsoft.vscode- ?
  • Intelli-sense should not show already entered extensions: OK
  • Maybe it's better remove: ExtensionsConfigurationSchema / defaultSnippets / Example ?

const location = getLocation(document.getText(), document.offsetAt(position));
const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
if (location.path[0] === 'recommendations') {
const config = vscode.workspace && vscode.workspace.getConfiguration('extensions.json');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not thinkvscode.workspace.getConfiguration('extensions.json') will get the extension recommendations.
You might have to read the document and parse it. You already have document with text, so you can just use parse from jsonc-parser to get the existing recommendations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. It's my first try to do something in vscode source. Sorry. I pushed another try.

@sandy081
Copy link
Member

LGTM. Thanks a lot for PR.

@sandy081 sandy081 merged commit 394932d into microsoft:master May 17, 2017
@sandy081 sandy081 added this to the May 2017 milestone May 30, 2017
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants