Skip to content

evil-jump does not integrate well with go-mode #1337

Open
@Miciah

Description

@Miciah

Issue type

  • Enhancement request

Environment

Emacs version: GNU Emacs 28.0.50 (build 21, x86_64-pc-linux-gnu, cairo version 1.14.8) of 2020-07-18
Operating System: Red Hat Enterprise Linux Workstation release 7.6 (Maipo)
Evil version: Evil version evil-git-2bc6ca3
Evil installation type: manual
Graphical/Terminal: X
Tested in a make emacs session (see CONTRIBUTING.md): Yes

Reproduction steps

  • Start Emacs using make emacs.
  • Install and activate go-mode.
  • Load go-mode (M-x (require 'go-mode) Enter)
  • Edit a Go file (: e hello.go Enter).
  • Enter some Go code with a function definition and a call to that function:
package main

import (
	"fmt"
)

func foo() {
	fmt.Println("Hello, world!")
}

func main() {
	foo()
}
  • Put the cursor on the reference (in the above example, on "foo" in "main").
  • Press C-c C-j (godef-jump) to jump to the definition.
  • Press C-o (evil-jump-backward) to jump back to the function call.

Expected behavior

C-c C-j jumps to the definition of "foo", and C-o should jump back to the function call.

Actual behavior

C-c C-j jumps to the definition of "foo", and C-o does nothing.

Further notes

Evil Collection binds g d to godef-jump in go-mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions