LSP
The GoHT CLI can be used as a Language Server Protocol (LSP) server. This allows editors to provide GoHT-aware language features for .goht files.
Purpose
The GoHT LSP server is for integration with editors and IDEs. It is not intended to be used directly from the command line.
Help
To get help with the GoHT LSP server, you can run the following command:
Dependencies
The GoHT LSP server has a dependency on the Go GoPLS LSP server. You can install it by running the following command:
Usage
Normal usage of the GoHT LSP server does not require any flags or arguments. You can start the server by running the following command:
The GoHT LSP server communicates over stdio. The IDE or editor starts the server, sends GoHT document updates to it, and GoHT proxies Go-language requests through gopls.
The goht lsp command also supports --logFile, --traceClient, and --traceGoPls:
--logFile string- The file to write the log output to. The default isstderr.--traceClient- Enable tracing the messages between the IDE and the GoHT LSP server.--traceGoPls- Enable tracing the messages between the GoHT LSP server and the GoPLS LSP server.