Skip to content

Conversation

@neoGeneva
Copy link
Contributor

This pull request is exposing the new AnalyzeOpenDocumentsOnly feature merged into omnisharp-roslyn via OmniSharp/omnisharp-roslyn#2346

This pull request does two main things:

  • Calls the fileOpen and fileClose endpoints
  • Passes the new AnalyzeOpenDocumentsOnly flag as a startup parameter

And one additional weird thing I should point out:

  • Calls filesChanged endpoint when an active editor changes. I found without this when switching between tabs the diagnostics would be out of date and I'd have to make a modification to force it to refresh the file, which was pretty anoying.

@JoeRobich
Copy link
Member

@neoGeneva Thanks for the contribution! Since an O# restart is required for this option to take effect, you can add the option name to the list in this file, so that users will be prompted to restart. https://github.com/OmniSharp/omnisharp-vscode/blob/090acf09c8bd9e6802e6c2566de87cbedbc07b5b/src/observers/OptionChangeObserver.ts#L15-L27

@neoGeneva
Copy link
Contributor Author

@JoeRobich Sweet, will do. It looks like enableRoslynAnalyzers is missing from that list too, should I add that as well?

@JoeRobich
Copy link
Member

It looks like enableRoslynAnalyzers is missing from that list too, should I add that as well?

Ah, good catch. Please do.

@333fred
Copy link
Member

333fred commented Mar 14, 2022

Other than the typos, this is looking good.

@neoGeneva
Copy link
Contributor Author

Sweet, thanks @333fred, all fixed.

@JoeRobich JoeRobich merged commit 65799d3 into dotnet:master Mar 19, 2022
@neoGeneva
Copy link
Contributor Author

Woohoo, awesome! Thanks everybody 🙂

@JoeRobich
Copy link
Member

@neoGeneva Thanks for the contribution! I spun up a prerelease for anyone interested in trying it out https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.24.2-beta1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants