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

            Bug ID: 447949
           Summary: lsp-client: gopls results in constant errors when
                    typing
           Product: kate
           Version: 21.12.0
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: vend...@gmail.com
  Target Milestone: ---

SUMMARY
Editing a Go source code file with Kate configured to use gopls language server
results in constant errors to be thrown from gopls that doesn't happen with
other text editors such as vim.


STEPS TO REPRODUCE
1. Install gopls version v0.7.4
2. Configure Kate to use gopls for Go source code
3. Open a file with Go source code and try to type anything.

OBSERVED RESULT
If kate is configured so that it will "Switch to output view upon message type:
Error" (default behavior), then every couple of keystrokes will result in the
output view to pop up, stealing focus from the main textarea with the following
error:

```
   2022/01/04 19:26:00 no signature help: cannot find an enclosing function
        position={32 3}
19:26:00 LSP Server Error go@/home/vendion/projects/ssh-manage
```

Of course, the position value as well as the path will differ.

EXPECTED RESULT
Gopls shouldn't throw an error with pretty much every keystroke, much like how
it works with other text editors configured to use this language server.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.89.0
Qt Version: 5.15.2
Kernel Version: 5.15.12-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6820HQ CPU @ 2.70GHz
Memory: 31.2 GiB of RAM
Graphics Processor: Quadro M1000M/PCIe/SSE2

ADDITIONAL INFORMATION
The gopls language server was installed with `go install
golang.org/x/tools/gopls@v0.7.4` and I had to override the default LSP config
for Go.

```
{
        "servers": {
                "go": {
                        "command": [
                                "/home/vendion/go/bin/gopls"
                        ],
                        "commandDebug": [
                                "/home/vendion/go/bin/gopls",
                                "-rpc.trace"
                        ],
                        "rootIndicationFileNames": [
                                "go.mod",
                                "go.sum"
                        ],
                        "url": "golang.org/x/tools/gopls",
                        "highlightingModeRegex": "^Go$"
                },
                "php": {
                        "command": [
                                "/usr/bin/intelephense",
                                "--stdio"
                        ],
                        "url": "https://github.com/bmewburn/intelephense-docs";,
                        "highlightingModeRegex": "^PHP.*$",
                        "rootIndicationFileNames": [
                                "composer.json",
                                "*.php"
                        ]
                }
        }
}
```

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

Reply via email to