Go To Definition Not Working (Windows 10, Git Bash, Open JDK 8)
See original GitHub issueHi, For some reason, “gd” to “go to definition” isn’t working for me.
There was a similar issue reported on Gitter: https://gitter.im/neoclide/coc.nvim?at=5d35dfa209580b7bbb88d2d4
Maybe it’s a file path or escaping issue? Any troubleshooting ideas would be great!
The below is the error I get when wanting to jump to the definition of SpringApplication.
[coc.nvim] Error on ‘jumpDefinition’: request error nvim_call_function - Vim(edit):E480: ** No match**: jdt://contents/spring-boot-1.5.13.RELEASE.jar/org.springframework.boot/SpringApplication.class?=account-entitlement/C:%5C/Users%5C/P2812140%5C/.m2%5C/repository%5C/org%5C/springframework%5C/boot%5C/spring-boot%5C/1.5.13.RELEASE%5C/spring-boot-1.5.13.RELEASE.jar=/maven.pomderived=/true=/=/maven.pomderived=/true=/=/maven.groupId=/org.springframework.boot=/=/maven.artifactId=/spring-boot=/=/maven.version=/1.5.13.RELEASE=/=/maven.scope=/compile=/%3Corg.springframework.boot(SpringApplication.class
Workspace Output
See attached server.log
for output of :CocCommand workspace.showOutput java:
server.log
Attached GIF
Windows Version
I’m using Git Bash on Windows 10.
OS Name Microsoft Windows 10 Enterprise Insider Preview
Version 10.0.19569 Build 19569
Java Version
$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
The URL contains
?
character, which causes a wildcard matching bug of both VIM and NeoVIM on Windows. Unlike Unix, Windows uses backslash as the path separator, butfnameescape()
also uses backslash as the escaping character. After escaping, any?
in the original URL would become\?
. For:edit
command, the argument is treaded as{file}
for VIM, thus, wildcard expansion applies. However, the escape does not work at all. The\
is recognized as the path separator (not the escaping charactor) , so?
would still be treated as a wildcard, causing VIM to search in the path, resulting inNO MATCH
error.This is a rather frustrating bug of VIM on Windows, as such a fundamental function
fnameescape()
is broken. Difficult to handle such URLs unless opening them using a different approach from:edit {file}
.Please upload connection log so I could reproduce it easily, please follow these steps:
let g:node_client_debug = 1
to your vimrc.:call coc#client#open_log()
.