-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Conversation
@thr0w, |
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.')) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Excluded
Microsoft.vscode-markdown
. Can I exclude all packages starting withMicrosoft.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'); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
LGTM. Thanks a lot for PR. |
Intellisense for extensions.json providing installed extensions
from issue #12744