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

            Bug ID: 449332
           Summary: LSP Client Rename does not work for Go and gopls
           Product: kate
           Version: 21.12.1
          Platform: Archlinux Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: juris788999...@outlook.com
  Target Milestone: ---

SUMMARY

LSP Client rename symbol functionality is broken for Go and gopls.

STEPS TO REPRODUCE
1. Call LSP Client -> Rename for some symbol (for example function)
2. Enter new name


OBSERVED RESULT
Symbol was not renamed.

EXPECTED RESULT
Symbol should be renamed

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

Sample main.go file:

package main

func main() {
    myFunction()
}

// myFunction is just a dummy function
func myFunction() {
    return
}

Trace logs from gopls when calling rename action:

[Trace - 18:41:39.802 PM] Sending request 'textDocument/rename - (12)'.
Params: {
        "newName": "myFunctionNew",
        "position": {
            "character": 12,
            "line": 7
        },
        "textDocument": {
            "uri": "file:///tmp/goproj/main.go"
        }
    }


[Trace - 18:41:39.803 PM] Received response 'textDocument/rename - (12)' in
0ms.
Result:
{"documentChanges":[{"textDocument":{"version":167,"uri":"file:///tmp/goproj/main.go"},"edits":[{"range":{"start":{"line":3,"character":4},"end":{"line":3,"character":14}},"newText":"myFunctionNew"},{"range":{"start":{"line":6,"character":3},"end":{"line":6,"character":13}},"newText":"myFunctionNew"},{"range":{"start":{"line":7,"character":5},"end":{"line":7,"character":15}},"newText":"myFunctionNew"}]}]}



Operating System: Arch Linux
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600G with Radeon Graphics
Memory: 13,6 GiB of RAM
Graphics Processor: AMD RENOIR

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

Reply via email to