https://bugs.kde.org/show_bug.cgi?id=416338

            Bug ID: 416338
           Summary: LSP configuration for Go (golang)
           Product: kate
           Version: 19.12.1
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: wouter-...@publica.duodecim.org
  Target Milestone: ---

Created attachment 125171
  --> https://bugs.kde.org/attachment.cgi?id=125171&action=edit
LSP configuration file with modified Go settings

The LSP (Sourcegraph) client Kate currently uses for Go is deprecated; Go has
an official client in its tools repository that's used by most editors now.

See also the README for the Sourcegraph server:
https://github.com/sourcegraph/go-langserver

Link to the official LSP server, named gopls:
https://github.com/golang/tools/tree/master/gopls

I've changed the server for Go in the settings.json file. I also had to enable
some workspace root configuration for the LSP server to work correctly.

Here are the settings I've got now:

"go": {
        "command": ["/home/wouter/.local/gobin/gopls"],
        "commandDebug": ["/home/wouter/.local/gobin/gopls", "-debug"],
        "rootIndicationFileNames": ["go.mod", "go.sum"],
        "url": "https://github.com/golang/tools/tree/master/gopls";,
        "highlightingModeRegex": "^Go$"
},


I will try to attach my modified settings file to this report in case that
would turn out to be helpful.

Thanks for working on LSP support!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to