lsp

module
v0.0.0-...-fcb79a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2022 License: BSD-3-Clause

README

What?

The module provides a wireframe for implementing Language Server protocol server in Go. Note that it does not provide any actual smartness, just a general wireframe: message types, JSON RPC 2.0 serialization, communication etc.

The module is based on the existing on the existing golang.org/x/tools/gopls package.

How?

The majority of this module code is simply copied from the original repository, and more details about how it's done you can find in ./doc/creation.md file.

Why?

The copied packages contain a very nice functionality which isn't accessible since they are internal in the original module.

License?

The same "BSD-3-Clause license" used by the original repository. Here I've changed Copyright section only because we have some additional code that may have some errors, and I didn't want anyone to blame the original developers ("The Go Authors"). But they deserve all the credits for the code we're using here.

Version?

Current main branch is based on the original repository commit eb70795 from December 17, 2022.

Directories

Path Synopsis
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in internal/lsp
Invoke with //go:generate helper/helper -t Server -d protocol/tsserver.go -u lsp -o server_gen.go invoke in internal/lsp
Package lsppos provides utilities for working with LSP positions.
Package lsppos provides utilities for working with LSP positions.
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
Package protocol contains the structs that map directly to the wire format of the "Language Server Protocol".
generate
GenLSP generates the files tsprotocol.go, tsclient.go, tsserver.go, tsjson.go that support the language server protocol for gopls.
GenLSP generates the files tsprotocol.go, tsclient.go, tsserver.go, tsjson.go that support the language server protocol for gopls.
Package safetoken provides wrappers around methods in go/token, that return errors rather than panicking.
Package safetoken provides wrappers around methods in go/token, that return errors rather than panicking.
up
span
Package span contains support for representing with positions and ranges in text files.
Package span contains support for representing with positions and ranges in text files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL