object88 / langd

A Language Server Protocol implementation in Go for Go
MIT License
7 stars 0 forks source link

Make LSP API available over gRPC / CLI #46

Open object88 opened 6 years ago

object88 commented 6 years ago

There are a large number of potential commands available via the LSP. It might be interesting to also expose these over the CLI. For example:

langd definition /usr/bob/go/src/github.com/bob/projectRobert/robert.go:80:4

This would require scanning through already open projects / workspaces to see if the file is loaded, and attach to that workspace for the duration of the CLI call. Alternately, if that workspace was not already open, should be be opened? Of should that require an explicit call to open? If a workspace gets opened, then scoping becomes problematic; in theory, that workspace would stay open for some time, and if another request comes in at a parent level, that workspace would get overlapped. It might be better to open-and-close workspaces that are only referenced by the CLI?

object88 commented 6 years ago

Perhaps the current working directory for the command can act as the root of the workspace.