-
Notifications
You must be signed in to change notification settings - Fork 299
Conversation
Wow, excellent! Thanks for testing out the
Interesting - would it be possible to see the the value we get for the completion? If you build One with It would be helpful to see the value of
Hmm, the flag looks ok (and the code using it), but I'm wondering how it gets passed in? It looks like there may be a file missing (the |
const command = Oni.configuration.getValue("cpp.langServerCommand", "clangd") | ||
|
||
const serverOptions = { | ||
command, |
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.
Regarding the stdErrAsLog
issue - it looks like it's picked up as part of these options, so you'll need to include it as part of this object:
const serverOptions = {
command,
stdErrAsLog: true,
}
I think that should address the issue you had where it wasn't getting set / defined in the language client code
Just added a comment on passing the |
Re-based on master, now can't build Oni :( |
Since #765 is not always in the way, I could resume :D The flag now works as expected, thanks! Regarding the completion issue, I took a deeper look at it and the issue is on Oni's side. The protocol states that The first entry in the response that So I made a few changes and now it works. Please review the changes |
Looks great @TalAmuyal ! Thanks for debugging into the completion issue and fixing the root cause 👍 Tested it against another language provider (the omnisharp/C# one), and it worked great. Bringing this in now. |
Thanks for the contribution, @TalAmuyal ! I'll create a new release today including this change. |
This is still a work in progress.
clangd
works with the changes in this PR.However, there are some issues:
Completion completes too much (probably
clangd
-s fault)For instance, when writing
namesp
, the first completion option isnamespace name
.The
name
part is a place holder for the name of the namespace.The issue here, is that selecting that option for completion adds the word
name
.I suspect that this is due to a misuse of the
label
LSP field on the server side.Stdout used for debugging
clangd
outputs a copy of the input and output as logs into stdout.The format is more or less
HTTP-HEADER <-- request-msg reply-msg -->
.As a temporary hack, a new flag is introduced that instructs which behavior should be used with the stderr of the specific LSP server (either log it as error or as debug).
Which brings me the the next issue: IDK TypeScript, so there is a run-time error with this flag.
It is always evaluated as undefined so I or'ed it with
true
until I figure out what's wrong (hints will be appreciated).