Skip to content
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

fix: gotoDefinition workaround for java on Windows #2742

Closed
wants to merge 3 commits into from

Conversation

AdnoC
Copy link

@AdnoC AdnoC commented Dec 20, 2020

Fixes: neoclide/coc-java#82

Adds specific workarounds to fix "go to definition" functionality on Windows.
Two workarounds are implemented:

As the :edit command was failing, we instead call nvim_buf_set_name to set the buffer name without expansion. Then we :edit the current file in order to run autocommands.

Additionally, the URI of the loaded definition was unknown:2, which is incorrect. So we do not normalize the path when in a jdt:// file.

@chemzqm
Copy link
Member

chemzqm commented Dec 20, 2020

nvim_buf_set_name exists on neovim only.

@AdnoC
Copy link
Author

AdnoC commented Dec 20, 2020

You are correct.

@chemzqm
Copy link
Member

chemzqm commented Dec 21, 2020

I'll fix the issues while avoid nvim_buf_set_name

@chemzqm chemzqm closed this Dec 21, 2020
@AdnoC
Copy link
Author

AdnoC commented Dec 21, 2020

bf94769 does not fix the issue. Pulled master, rebuilt, and am still getting the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants