x/tools/gopls: Gopls keeps returning Result: null for all requests #53311
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
gopls version
go env
What did you do?
I'm working on the online editor and I'm integrating LSPs into it. It works for Python at the moment and I was trying to add the Golang support. I keep my work on this branch.
First make sure that you have gopls installed. If you want to see how Python integration works you'll need to install the packages mentioned in the
requirements.txt
in the root directory of the repo. You can run this project by running following commands:After everything is spinned up you can access http://localhost:4200 to interact with the frontend. After clicking "Start new session" button you'll see the editor. Once you select
go
from the dropdown in the top left corner the editor will try to talk togopls
. As you can see in the screenshot:The first response of the
gopls
looks good: it returns the supported features. But every other response isnull
. I use exactly the same code for handling Python, so I doubt that it's caused anywhere by the wiring. I also enabled tracing to make sure what is coming to and fromgopls
, but that only confirmed that the result is always null. Perhaps I'm simply missing some initialization of the gopls? Or some packages on my pc?What did you expect to see?
I was expecting to see a functional results from LSP that would enrichen the editor - similarly as I see for Python.
What did you see instead?
I saw only null results.
Editor and settings
N/A
Logs
The text was updated successfully, but these errors were encountered: