x/tools/gopls: export LSP types so they can be imported by external consumers
japem opened this issue · 3 comments
The code gopls uses for LSP types in tools/gopls/internal/protocol looks great and well-maintained. There doesn't appear to be another well-maintained open-source alternative. Is it possible to move this code out from under internal so it can be utilized by other consumers who wish to implement a language server in Go?
That's a bummer to hear. Is the existing code fit for use to create types to use in a generic, non-gopls language server? How much maintenance is required if I were to fork it, beyond pointing the codegen at the latest version of the spec?
Unfortunately we have strict compatibility rules on the Go team that would make it rather a lot of toil to export a volatile package such as the protocol package. We can and do change the API of that package in breaking ways.
It would be nice to expose the guts of gopls as a 'LSP in a box' toolkit that could be used for other languages, but frankly speaking we do not have the resources to support such an effort. Folks are of course welcome to fork for their own purposes, but currently have no plans to do this ourselves in the near future.