-
Notifications
You must be signed in to change notification settings - Fork 675
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
Add miscellaneous file open notifications #7652
Conversation
Can we potentially throttle it somehow? For example if a notification is already showing, we update the notification to be 'Multiple open files..." so that further notifications don't stack up?
I'm fine iwth the text shown in the picture, seems clear enough
I would say no - once per session seems reasonable
I would lean towards yes - there might be workspaces that have lots of misc files and others not. But not 100% sure.
I think that would be a good idea actually - yeah. |
context.workspaceState.update(SuppressMiscellaneousFilesToastsOption, undefined); | ||
|
||
languageServer._projectContextService.onActiveFileContextChanged((e) => { | ||
const hash = createHash(e.uri.toString(/*skipEncoding:*/ true)); |
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.
maybe move this down below the other checks, since it could be more expensive?
NotifiedDocuments.add(hash); | ||
|
||
const message = vscode.l10n.t( | ||
'The active document is not part of the open workspace. Not all language features will be available.' |
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 was wondering if we wanted to add like a learn more docs link with how they might tell why the file is in misc. For example, making sure the file is part of a project, making sure the language server has a project loaded, making sure the project is part of the loaded sln, etc.
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 think that is a good idea and we can do it in a follow up.
@webreidi I see VS has a page on Misc Files. Is that a good one to link to for now? Should we have a C# ext. centric page created?
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.
Created draft PR #7654 to explore this further.
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 think the VS Link will only cause confusion. But we can add to the FAQ the specifics of this.
1e08959
to
321ffe3
Compare
Gives the user more warning that they are editing a file outside their workspace.
The same notification text is now used in the language status bar when a miscellaneous file is open.
Features: