-
Notifications
You must be signed in to change notification settings - Fork 690
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
Adds support for different omnisharp "engines" #3817
Conversation
I think this is a step in the right direction. Would definitely want to make sure changing the indexing doesn't break the Razor or Debugger 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.
Really cool idea! Ya the indexing is definitely concerning. However; given we rely on LSP contracts I'd imagine wherever we depend on you would just work because you also need to respect those contracts in order for VSCode to "ok" your data.
So the reason for the change of indexing is to follow the lsp spec (0 based vs 1 based). The only reason omnisharp had been ones based originally was due to the legacy how emacs/vim did line numbers internally. NOTE: Omnisharp does 0-based indexes today, and the configuration setting just turns on a jsonconverter that transforms the 0-based indexes to 1-based. So today we're translating twice I'll take a look and see if there are things that need to be done in razor plugin, but |
Codecov Report
@@ Coverage Diff @@
## master #3817 +/- ##
==========================================
+ Coverage 85.99% 86.01% +0.01%
==========================================
Files 60 60
Lines 1878 1880 +2
Branches 218 218
==========================================
+ Hits 1615 1617 +2
Misses 202 202
Partials 61 61
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
1875bdc
to
7fe64e9
Compare
7fe64e9
to
41026c3
Compare
…es getting dropped
Move CodeActions to LSP to resolve cancellations
…fore waiting for the workspace to load
… feature/lsp-engine
….1 to fix loading issues.
Re-enable razor tests
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.
Very excited for this work to get in.
Sometimes you might want to disable this if you're just debugging the extension and not the server, so leaving the alternative commented.
updated to actually run on Mac and hopefully linux @333fred let me know |
I have brought the changes from this PR up to date and pushed it as branch feature/lsp-engine. We can continue to evolve these changes from the feature branch. |
Adds support for different OmniSharp "engines" and moves to using 0-based indices.
@JoeRobich I'm mainly looking to test the waters on your end if this is something you would be okay with. At the end of the day I think we only need one engine, but the idea here is that we would have a nice way to fallback to the old one in the event there were problems.
The goal here is to move the extension forward a little bit:
This replaces the custom omnisharp protocol with the vscode language client. However all of the features of the language client are disabled, this means that requests are processed the same as they always have been (with full buffers).
Consider this phase 1, the goal of phase 2 could be to move away from sending the buffer every time and instead using the text document events built into lsp. Phase 3 might involve removing some handlers for operations that don't have special behaviors (metadata, tests, etc).
Things that need to be done:
This depends on OmniSharp/omnisharp-roslyn#1815 which adds the support for calling exising omnisharp endpoints via LSP.