You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zk/cmd/lsp.go

24 lines
556 B
Go

package cmd
import (
"github.com/mickael-menu/zk/adapter"
"github.com/mickael-menu/zk/adapter/lsp"
"github.com/mickael-menu/zk/util/opt"
)
// LSP starts a server implementing the Language Server Protocol.
type LSP struct {
Log string `type:path placeholder:PATH help:"Absolute path to the log file"`
}
func (cmd *LSP) Run(container *adapter.Container) error {
server := lsp.NewServer(lsp.ServerOpts{
Name: "zk",
Version: container.Version,
LogFile: opt.NewNotEmptyString(cmd.Log),
Container: container,
})
return server.Run()
}