Open Lawqup opened 3 months ago
I've found a workaround: override godef-jump
in the go mode hook. I.e., in the hook, redefine godef-jump
:
(defun godef-jump ()
(interactive)
(lsp-find-definition))
You can also use go install github.com/jjuliano/godef@latest
.
I'm not sure if this is a go mode issue, an evil issue, or some issue with how
C-c C-j
is being translated to evil-mode keybindings, but I'm unable to rebind "g d" to evil-goto-definition or lsp-find-definition.I've tried local-set-key, bind-key, making my own minor mode and trying to override "g d".
I have
godef
installed (apparently the latest version), but for some reason I can't get it to work for anything, e.g.:This is on OSX but I get the same thing on Arch.
So, I either need to fix godef or rebind "g d" to use the lsp find definition.
I should note, I can bind evil-goto-definition to other stuff like "g D", but this isn't ideal since all other languages use g d to jump to definition.