Gopls LSP Configuration
More details below describe how to configure the Gopls language server found here
NOTE: This installation process assumes Go has been installed on the machine.
Installing the Language Server
Run the following command to install the language server:
go install golang.org/x/tools/gopls@latest
After the command completes run the following command to check the installation:
That command should result in outpuit similar to the following:
If that output is not produced the correct output check the installation and also check to make sure the executuble installation folder has
been added to the system
PATH environment variable.
Use the following command to locate the installation folder of the language server:
That command should result in output similar to the following:
Take note of that folder locate as it will be needed in the configuration steps that follow.
Start Zeus and use the Options, Document Types
menu to edit the Go document type and in the Language Server configuration panel apply the following configuration settings:
Program Type: Executable
NOTE: The executable details used are the same as the details noted from the earlier steps of the configuration process.
Using the Language Server
To test the configuration create a simple
test.go file and fire off an auto-complete request:
If the auto complete does not fire make sure the
GOPATH is correctly configured and the
test.go file folder location is in that path.
Released: 29th January 2024