-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
lsp-sample based extension – no onCompletion
triggers
#156
Comments
Any additional info? |
Hey, thanks for checking! :) Very weird, because I've tested this on three different machines and it didn't work on any of them. I'm guessing there must be some other thing that's interfering with the client<->server communication on all of them then (even though two of them are non-dev machines and I can't think of anything running on them that could be using the same port as the language server or something like that). 🤔 In any case, I'll test it in a completely fresh environment and report back if it does indeed work there. |
Alright, I have some more info now: I can confirm it functioning correctly on the three machines I've tested on before if I open an existing I'm pretty sure this has worked by just switching the language before when I first published the extension last year – I didn't have to save a file before the client started asking the language server for completions. But maybe this has changed? Maybe there's some flag I need to set in the |
@mserajnik this is expected since you only register for the file schema. If you want to get
OK to close ? |
Thanks, works perfectly. 👍 Weird, I'm very positive this has worked with Anyway, closed since this fixes my issue. Have a great day! :) |
Sorry, need to reopen this. :/ Everything's been working fine in debug mode with the addition of the second selector for But when using this new version of the extension (not debug mode), the language server once again doesn't seem to be working (again, only the snippets come up) – and this time it doesn't matter if it's an Trying to debug with Extension can be found here: https://marketplace.visualstudio.com/items?itemName=mserajnik.dnh I've published it by running: vsce package
vsce publish If I inspect the compiled Thank you for your time! |
@mserajnik here are some tips to trace this down:
Let me know how it goes. |
Thanks for the suggestions. I've created a hotfix branch and tried all of this, but no luck so far. Details of what I've done:
I can now confirm:
So, my guess would be, that for some reason, the extension gets activated (hence the Again, when launching the extension in debug mode, everything works as it should. The output channel comes up and I can see the communication and all the completions come up as they should. I can also see the |
The console.log statements appear in the developer console which you can open via |
Thank you! I didn't think about checking the developer console for the output. I can indeed see an error message in there when triggering the extension activation:
It's quite a long stack, but I'll look into it now. Edit: Just saw you've actually had the same issue and fixed it by including |
I can indeed confirm that not excluding Thank you! Closed. |
No problem. Happy you got it working. |
I've developed an extension that's (loosely) based on lsp-sample around half a year ago. Back then, it was working fine.
Yesterday, I made some changes and updated some dependencies. But now it looks like the communication with the language server doesn't work correctly.
It initializes just fine (I'm debugging this with
<ext>.trace.server
and also just plainconsole.log()
calls in the server), but the client for some reason never sends any completion requests. The defined snippets here work just fine though, so it's not like the client isn't working at all, it just doesn't want to utilize the language server after initializing it.Reverting to the old version from around half a year ago didn't help, so I can only assume some change in a more recent version of VS Code now causes this behaviour (seems weird, but I can find no other explanation).
I've already confirmed that it's not just an issue on my local machine.
I would be glad for any help – I'm pretty sure it's just one little oversight. I've already made some more updates and added the aforementioned debug measures on the
develop
branch.Steps to get this running/reproduce the issue:
develop
branchyarn && yarn compile
Launch client
Touhou Danmakufu (dnh)
or open a file with.dnh
extensiont
VS Code will now suggesttask
, which is a snippet, butt
)console.log()
that should happenonCompletion
also doesn't get calledThank you in advance!
The text was updated successfully, but these errors were encountered: