Skip to content

Commit ba347ab

Browse files
committed
Fix lsp-java-lens-mode
1 parent 9685334 commit ba347ab

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

lsp-java.el

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,28 +1538,29 @@ current symbol."
15381538
"workspace/executeCommand"
15391539
(list :command "vscode.java.resolveMainMethod"
15401540
:arguments (vector (lsp--buffer-uri)))
1541+
15411542
(lambda (result)
15421543
(funcall callback
15431544
(append
15441545
(-map
15451546
(lambda (lens)
1546-
(-doto lens
1547-
(lsp-make-code-lens :command?
1548-
(lsp-make-command
1549-
:title "Run"
1550-
:command (lambda ()
1551-
(interactive)
1552-
(lsp-java--start-main-class lens t))))))
1547+
(lsp-make-code-lens :command?
1548+
(lsp-make-command
1549+
:title "Run"
1550+
:command (lambda ()
1551+
(interactive)
1552+
(lsp-java--start-main-class lens t)))
1553+
:range (lsp-get lens :range)))
15531554
result)
15541555
(-map
15551556
(lambda (lens)
1556-
(-doto (ht-copy lens)
1557-
(lsp-make-code-lens :command
1558-
(lsp-make-command
1559-
:title "Debug"
1560-
:command (lambda ()
1561-
(interactive)
1562-
(lsp-java--start-main-class lens nil))))))
1557+
(lsp-make-code-lens :command
1558+
(lsp-make-command
1559+
:title "Debug"
1560+
:command (lambda ()
1561+
(interactive)
1562+
(lsp-java--start-main-class lens nil)))
1563+
:range (lsp-get lens :range)))
15631564
result))
15641565
lsp--cur-version))
15651566
:mode 'tick)))

0 commit comments

Comments
 (0)