-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go To Definition Not Working (Windows 10, Git Bash, Open JDK 8) #82
Comments
It looks like LanguageClient-neovim had a similar issue and was able to resolve it. @chemzqm, Do you have any insight into this issue? P.S.: I see we declared support for the Looks like we added support for eclipse.jdt.ls in #112 of |
Please upload connection log so I could reproduce it easily, please follow these steps:
|
@chemzqm server2.log is uploaded. Also, around 10:57:49 PM in the logs is an example of the error when trying to jump to the definition of Thank you so much!! <3 I'm willing to help and contribute, but could use some guidance or pointers.
|
Doing more research. I looked at the eclipse.jdt.ls project and the This package org.eclipse.jdt.ls.core.internal;
...
public final class JDTUtils {
...
// Line 866
URI uri = new URI(uriString);
// Platform.OS_WIN32 => "win32"
if (Platform.OS_WIN32.equals(Platform.getOS()) && URIUtil.isFileURI(uri)) {
uri = URIUtil.toFile(uri).toURI();
}
return uri; Also, more special |
has win32unixAlso, I see there's calls to
has win32However, |
Try |
The URL contains This is a rather frustrating bug of VIM on Windows, as such a fundamental function |
@chemzqm I tried this, and get the same error. @chengzeyi Thank you for some of this clarity. Is there a workaround for me? For example, how you would you manually edit the following JDT URI to work on Vim Windows?
I can't seem to edit that URI and get my Neovim to open it. Potential Workaround@ZyX-I posted a modified if has('win32') || has('win64')
function Fnameescape(f)
return '`='.json_encode(a:f).'`'
endfunction
else
let Fnameescape = function('fnameescape')
endif Will something like that maybe work? |
On Windows, due to Vim's bug, you can't correctly `fnameescape()` special characters in buffer name. (reference: vim/vim#541) Therefore, you can't open a buffer whose name contains some special character with `:edit`, preventing correctly jump to definition in some LSPs. For example, jdtls returns custom URI (jdt://...) if the definition is inside metadata. This URI contains `?`, so it can't be opened in Windows (neoclide/coc-java#82). I found that you can workaround this bug using Neovim API to set a buffer name directly, though it's Neovim-only solution.
On Windows, due to Vim's bug, you can't correctly `fnameescape()` special characters in buffer name. (reference: vim/vim#541) Therefore, you can't open a buffer whose name contains some special character with `:edit`, preventing correctly jump to definition in some LSPs. For example, jdtls returns custom URI (jdt://...) if the definition is inside metadata. This URI contains `?`, so it can't be opened in Windows (neoclide/coc-java#82). I found that you can workaround this bug using Neovim API to set a buffer name directly, though it's Neovim-only solution.
On Windows, due to Vim's bug, you can't correctly `fnameescape()` special characters in buffer name. (reference: vim/vim#541) Therefore, you can't open a buffer whose name contains some special character with `:edit`, preventing correctly jump to definition in some LSPs. For example, jdtls returns custom URI (jdt://...) if the definition is inside metadata. This URI contains `?`, so it can't be opened in Windows (neoclide/coc-java#82). I found that you can workaround this bug using Neovim API to set a buffer name directly, though it's Neovim-only solution.
On Windows, due to Vim's bug, you can't correctly `fnameescape()` special characters in buffer name. (reference: vim/vim#541) Therefore, you can't open a buffer whose name contains some special character with `:edit`, preventing correctly jump to definition in some LSPs. For example, jdtls returns custom URI (jdt://...) if the definition is inside metadata. This URI contains `?`, so it can't be opened in Windows (neoclide/coc-java#82). I found that you can workaround this bug using Neovim API to set a buffer name directly, though it's Neovim-only solution.
) On Windows, due to Vim's bug, you can't correctly `fnameescape()` special characters in buffer name. (reference: vim/vim#541) Therefore, you can't open a buffer whose name contains some special character with `:edit`, preventing correctly jump to definition in some LSPs. For example, jdtls returns custom URI (jdt://...) if the definition is inside metadata. This URI contains `?`, so it can't be opened in Windows (neoclide/coc-java#82). I found that you can workaround this bug using Neovim API to set a buffer name directly, though it's Neovim-only solution.
Any update on this? I am experiencing a similar error when trying to go to definition:
I have jdtls installed and no configurations related to it in my |
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.
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.
Java Version
The text was updated successfully, but these errors were encountered: