[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-02-03 Thread Mark Nauwelaerts
https://bugs.kde.org/show_bug.cgi?id=447640

Mark Nauwelaerts  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://invent.kde.org/util
   ||ities/kate/commit/e1b89deae
   ||c075e9b155877ba5e549ed87baf
   ||1395
 Status|ASSIGNED|RESOLVED

--- Comment #7 from Mark Nauwelaerts  ---
Git commit e1b89deaec075e9b155877ba5e549ed87baf1395 by Mark Nauwelaerts.
Committed on 31/01/2022 at 21:05.
Pushed by cullmann into branch 'master'.

lspclient: also support some alternative WorkspaceEdit replies
Related: bug 449332

M  +22   -9addons/lspclient/lspclientpluginview.cpp

https://invent.kde.org/utilities/kate/commit/e1b89deaec075e9b155877ba5e549ed87baf1395

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

[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-01-31 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=447640

Bug Janitor Service  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #6 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/utilities/kate/-/merge_requests/580

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

[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-01-30 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=447640

--- Comment #5 from bokunoc...@gmail.com ---
there is a way to get auto import to work, by reloading the file from disk
after running code action.
run code action autoimports >> dont save the file >> reload file from disk

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

[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-01-30 Thread Mark Nauwelaerts
https://bugs.kde.org/show_bug.cgi?id=447640

Mark Nauwelaerts  changed:

   What|Removed |Added

 CC||mark.nauwelae...@gmail.com

--- Comment #4 from Mark Nauwelaerts  ---
See the mentioned other bug #449332.  The server issues a type of response that
the client did not claim to support (and as such also does not parse).

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

[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-01-29 Thread Juris
https://bugs.kde.org/show_bug.cgi?id=447640

--- Comment #3 from Juris  ---
(In reply to Juris from comment #2)
> I can confirm this. Basically Organize Imports functionality does not seem
> to work in LSP Client. This is interesting since enabling trace log for
> gopls shows response from LSP server side:
> 
> --- 8< ---
> [Trace - 18:28:12.986 PM] Sending request 'textDocument/rename - (8)'.
> Params: {
> "newName": "myFunctionNew",
> "position": {
> "character": 8,
> "line": 3
> },
> "textDocument": {
> "uri": "file:///tmp/goproj/main.go"
> }
> }
> 
> 
> [Trace - 18:28:12.987 PM] Received response 'textDocument/rename - (8)' in
> 0ms.
> Result:
> {"documentChanges":[{"textDocument":{"version":115,"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"}]}]}
> --- 8< ---
> 
> Example main.go file, trying to rename myFunction:
> 
> --- 8< ---
> package main
> 
> func main() {
> myFunction()
> }
> 
> // myFunction is just a dummy function
> func myFunction() {
> return
> }
> --- 8< ---
> 
> 
> 
> 
> Kate Version 21.12.1
> gopls 0.7.4
> 
> 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

Sorry, got a mixup. Examples above were for LSP rename functionality (which
also does not work, probably a separate bug). Proper example for broken
Organize imports follows:

main.go:

package main

func main() {
fmt.Println("")
}



Trace logs from gopls:

[Trace - 18:32:58.402 PM] Sending request 'textDocument/codeAction - (3)'.
Params: {
"context": {
"diagnostics": [
]
},
"range": {
"end": {
"character": 0,
"line": 4
},
"start": {
"character": 0,
"line": 3
}
},
"textDocument": {
"uri": "file:///tmp/goproj/main.go"
}
}


[Trace - 18:32:58.405 PM] Received response 'textDocument/codeAction - (3)' in
2ms.
Result: [{"title":"Organize
Imports","kind":"source.organizeImports","edit":{"documentChanges":[{"textDocument":{"version":147,"uri":"file:///tmp/goproj/main.go"},"edits":[{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"newText":"\nimport
\"fmt\"\n"}]}]}}]

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

[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-01-29 Thread Juris
https://bugs.kde.org/show_bug.cgi?id=447640

Juris  changed:

   What|Removed |Added

 CC||juris788999...@outlook.com
 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1

--- Comment #2 from Juris  ---
I can confirm this. Basically Organize Imports functionality does not seem to
work in LSP Client. This is interesting since enabling trace log for gopls
shows response from LSP server side:

--- 8< ---
[Trace - 18:28:12.986 PM] Sending request 'textDocument/rename - (8)'.
Params: {
"newName": "myFunctionNew",
"position": {
"character": 8,
"line": 3
},
"textDocument": {
"uri": "file:///tmp/goproj/main.go"
}
}


[Trace - 18:28:12.987 PM] Received response 'textDocument/rename - (8)' in 0ms.
Result:
{"documentChanges":[{"textDocument":{"version":115,"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"}]}]}
--- 8< ---

Example main.go file, trying to rename myFunction:

--- 8< ---
package main

func main() {
myFunction()
}

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




Kate Version 21.12.1
gopls 0.7.4

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.

[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-01-04 Thread Adam Jimerson
https://bugs.kde.org/show_bug.cgi?id=447640

--- Comment #1 from Adam Jimerson  ---
I can reproduce this issue as well, using gopls v0.7.4 with Kate  21.12.0. 

If it helps since the original reporter didn't include much details this is the
output from gopls

```
   2022/01/04 19:41:43 go env for /home/vendion/projects/ssh-manage
   (root /home/vendion/projects/ssh-manage)
   (go version go version go1.17.5 linux/amd64)
   (valid build configuration = true)
   (build flags: [])
   GOCACHE=/home/vendion/.cache/go-build
   GOFLAGS=
   GOINSECURE=
   GONOPROXY=
   GOSUMDB=sum.golang.org
   GO111MODULE=
   GONOSUMDB=
   GOROOT=/usr/lib/go
   GOMOD=/home/vendion/projects/ssh-manage/go.mod
   GOPATH=/home/vendion/go
   GOPRIVATE=
   GOMODCACHE=/home/vendion/go/pkg/mod
   GOPROXY=https://proxy.golang.org,direct
   2022/01/04 19:41:43 go/packages.Load
snapshot=0
directory=/home/vendion/projects/ssh-manage
query=[builtin git.sr.ht/~vendion/ssh-manage/...]
packages=11
   2022/01/04 19:41:44 falling back to safe trimming due to type errors:
[/usr/lib/go/src/runtime/vdso_linux.go:55:38: invalid operation: division by
zero /usr/lib/go/src/runtime/vdso_linux.go:56:38: invalid operation: division
by zero] or still-missing identifiers: map[memRecordCycle:true pageBits:true]
package="runtime"
   2022/01/04 19:41:44 discovered missing identifiers: map[options:true]
package="vendor/golang.org/x/text/unicode/bidi"
   2022/01/04 19:41:44 discovered missing identifiers: map[cpuMask:true]
package="golang.org/x/sys/unix"
   2022/01/04 19:41:44 falling back to safe trimming due to type errors:
[/usr/lib/go/src/os/user/cgo_lookup_unix.go:200:19: int not declared by package
C /usr/lib/go/src/os/user/cgo_lookup_unix.go:203:16:
bufferKind(C._SC_GETPW_R_SIZE_MAX) (value of type bufferKind) is not constant
/usr/lib/go/src/os/user/cgo_lookup_unix.go:204:16:
bufferKind(C._SC_GETGR_R_SIZE_MAX) (value of type bufferKind) is not constant]
or still-missing identifiers: map[]
package="os/user"
   2022/01/04 19:41:44 discovered missing identifiers: map[frameText:true
textViewIndex:true]
package="github.com/rivo/tview"
   2022/01/04 19:41:45 no signature help: cannot find an enclosing function
position={32 4}
   2022/01/04 19:41:51 no signature help: cannot find an enclosing function
position={32 5}
   2022/01/04 19:42:06 no signature help: no signature help within a string
literal
position={32 16}
   2022/01/04 19:42:15 background imports cache refresh starting2022/01/04
19:42:15 background refresh finished after 46.851335ms
19:41:43 LSP Server Info Setting up workspace [100%] Finished loading packages.
19:41:43 LSP Server Info go@/home/vendion/projects/ssh-manage
19:41:43 LSP Server Info go@/home/vendion/projects/ssh-manage
19:41:44 LSP Server Info go@/home/vendion/projects/ssh-manage
19:41:44 LSP Server Info go@/home/vendion/projects/ssh-manage
19:41:44 LSP Server Info go@/home/vendion/projects/ssh-manage
19:41:44 LSP Server Info go@/home/vendion/projects/ssh-manage
19:41:44 LSP Server Info go@/home/vendion/projects/ssh-manage
19:41:45 LSP Server Error go@/home/vendion/projects/ssh-manage
19:41:51 LSP Server Error go@/home/vendion/projects/ssh-manage
19:42:06 LSP Server Error go@/home/vendion/projects/ssh-manage
19:42:15 LSP Server Info go@/home/vendion/projects/ssh-manage
19:42:15 LSP Server Info go@/home/vendion/projects/ssh-manage
```

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

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

[kate] [Bug 447640] lsp-client gopls autoimports not working

2022-01-04 Thread Adam Jimerson
https://bugs.kde.org/show_bug.cgi?id=447640

Adam Jimerson  changed:

   What|Removed |Added

 CC||vend...@gmail.com

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