Skip to content

x/tools/gopls: Make "gopls/internal/lsp/protocol" package compatible with go.lsp.dev/protocol and make external #61338

@mnoah1

Description

@mnoah1

The gopls protocol package includes logic that would be useful for other language server implementations. There is already a go.lsp.dev/protocol package that contains significant overlap with the version of protocol included in gopls, and is depended on by several other LSP implementations for other languages that are written in Go.

Proposal would be to align gopls/internal/lsp/protocol with go.lsp.dev/protocol:

  • go.lsp.dev/protocol appears to be manually maintained. The auto generation logic in gopls/internal/lsp/protocol could be moved there and go.lsp.dev/protocol becomes the single source of truth for all type and interface definitions.
  • mappers and other logic for manipulating LSP related types could also be consolidated with go.lsp.dev/protocol as long as they are not go-specific
  • What's left should mainly be go-specific and could then become a "go-protocol" package that is make external

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions