-
Notifications
You must be signed in to change notification settings - Fork 418
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
Unable to see completion or diagnostics in LSP mode #1524
Comments
@mickaelistria I see that you've commented quite a bit on LSP mode. Do you see something obvious missing from the setup? TIA |
Unfortunately your issue doesn't ring me any bell to be turn into a hint. |
@mickaelistria Oh! Hope the future ventures are fruitful :) |
I think @mholo65 and @david-driscoll are the omnisharp-lsp experts. |
@patilarpith I quickly checked the logs, and I’m unable to see a completion request from the client. Is there any way you could provide a minimal repro with your setup? |
@mholo65 Could it be because omnisharp server responded with If not then I'll spend some time and set-up a minimum repo with the above config P.S. I tried running with the latest |
@patilarpith OmniSharp in LSP mode will return [Trace - 23:10:10] Sending request 'textDocument/completion - (30)'.
Params: {
"textDocument": {
"uri": "file:///c%3A/Users/mb/src/tmp/lsp-test/Program.cs"
},
"position": {
"line": 15,
"character": 20
},
"context": {
"triggerKind": 2,
"triggerCharacter": "."
}
} and then the response from the server [Trace - 23:10:10] Received response 'textDocument/completion - (30)' in 116ms.
Result: [
{
"label": "BackgroundColor",
"kind": 10,
"detail": "BackgroundColor",
"documentation": "Gets or sets the background color of the console.\nReturns: A value that specifies the background color of the console; that is, the color that appears behind each character. The default is black.\nSystem.ArgumentException: The color specified in a set operation is not a valid member of System.ConsoleColor .\nSystem.Security.SecurityException: The user does not have permission to perform this action.\nSystem.IO.IOException: An I/O error occurred.",
"deprecated": false,
"preselect": false,
"insertText": "BackgroundColor$0",
"insertTextFormat": 2
},
{
...
}
] |
Does this mean in LSP-mode there's no completion? I'm using Emacs with the Eglot package and get no completion for C#. |
No, From the specification:
Basically, if some of the information for the |
Got any logs I could look at? |
@mholo65 Looks like in my scenario this was something to do with the monaco language client fork. If someone is still interested, here is a minimum setup: https://github.com/patilarpith/monaco-languageclient-omnisharp-lsp |
@mholo65 I created a new app with
|
@sebasmonia skimmed through logs and saw this:
@david-driscoll it looks like a bug where a |
Does this mean everything is working as expected for you now? |
@mholo65 it also seems similar to #1505 |
Thanks @sebasmonia yes, it is. Did miss that issue, thanks for pointing it out! |
Fixed by #1562 and available in latest release https://github.com/OmniSharp/omnisharp-roslyn/releases/tag/v1.34.3 |
I'm running dotnet sdk and omnisharp-roslyn in a Debian 9 docker image using these setup instructions.
I see that the LSP initialization works without any failure and there are no errors in registration or loading the project files.
The only two notable issue that I see in the debug logs are:
I'm neither seeing completion or diagnostics information for the project.
Global omnisharp json file at
$HOME/.omnisharp/
Solution.csproj
Versions:
dotnet sdk: 2.2.300
omnisharp roslyn: 1.32.20 (latest)
Language client: monaco-languageclient v0.9.0
monaco-editor: 0.14.3
Mono: Shipped with omnisharp-roslyn(1.32.20)
Attached debug log file of language server. omnisharp.log
The text was updated successfully, but these errors were encountered: