-
Notifications
You must be signed in to change notification settings - Fork 661
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
Read and react to O# option changes only when devkit isnt installed #5895
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Sam Harwell <[email protected]>
|
||
export default function createOptionStream(vscode: vscode): Observable<Options> { | ||
return Observable.create((observer: Observer<Options>) => { | ||
const disposable = vscode.workspace.onDidChangeConfiguration((e) => { | ||
//if the omnisharp or csharp configuration are affected only then read the options | ||
if ( | ||
e.affectsConfiguration('dotnet') || | ||
e.affectsConfiguration('omnisharp') || | ||
(e.affectsConfiguration('omnisharp') && !vscode.extensions.getExtension(csharpDevkitExtensionId)) || |
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.
Should this logic instead move to somewhere like
vscode-csharp/src/shared/options.ts
Line 349 in f01115f
public static shouldOmnisharpOptionChangeTriggerReload(oldOptions: Options, newOptions: Options): boolean { |
It'll probably work either way, but I'm somewhat surprised already that the Omnisharp option isn't being ignored by that.
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.
This will work, although I'm surprised it doesn't already given the other code that's doing similar filtering.
Address #5774