lspsaga.nvim icon indicating copy to clipboard operation
lspsaga.nvim copied to clipboard

References belong to incorrect node.

Open ch4xer opened this issue 2 years ago • 0 comments

Describe the bug

image

As you can see, case <- Change Statement is in main.go, however, the Reference tree show that the statement belongs to log.go, which is wrong.

Steps to reproduce

  1. create a simple golang project
  2. create log.go, which contains:
package main

func log(msg string) {
	Change <- true
}
  1. create main.go, which contains:
package main

var Change chan bool
func main() {
	select {
	case <-Change:
		// do something
	}
}
  1. put cursor to Change variable, and call lspsaga reference function

Expected behavior

case <- Change Statement is belongs to log.go in reference tree.

Neovim version (nvim -v)

NVIM v0.9.5 Build type: Release

lspsaga commit

2198c07

Terminal name/version

tmux 3.3a

ch4xer avatar Jan 26 '24 06:01 ch4xer