question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Go To Definition Not Working (Windows 10, Git Bash, Open JDK 8)

See original GitHub issue

Hi, 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

jump-definition-error

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:open
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
chengzeyicommented, Apr 22, 2020

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, but fnameescape() 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 in NO 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}.

1reaction
chemzqmcommented, Apr 22, 2020

Please upload connection log so I could reproduce it easily, please follow these steps:

  • Add let g:node_client_debug = 1 to your vimrc.
  • Restart your vim/neovim to make the issue happen.
  • Open the log file by command :call coc#client#open_log().
  • Attach the log file or paste content from the log.
Read more comments on GitHub >

github_iconTop Results From Across the Web

VSCode "go to definition" not working - Stack Overflow
Go to Extensions; Click "Disable All Installed Extensions"; Close and Reopen VS Code; Back to Extensions and "Enable All Extensions".
Read more >
Working on Git Bash - GeeksforGeeks
Step 1: Go to Github repository and in code section copy the URL. Step 2: In the Command prompt, add the URL for...
Read more >
Fix JAVA_HOME errors | Invalid directory | Not set or defined
However, you can address this issue. First, check the Ubuntu or Windows PATH variable and look to see if any other JRE or...
Read more >
Git
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed...
Read more >
Installing the JDK Software and Setting JAVA_HOME
If you do not already have the JDK software installed or if JAVA_HOME is not set, the GlassFish ESB installation will not be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found