-
Notifications
You must be signed in to change notification settings - Fork 147
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
Issue previewing nvim-jdtls jdt://
entries in global/workspace symbols
#728
Comments
jdt://
entries in global/workspace symbols
This seems to be an issue related to Is I tried reproducing this with |
@asmodeus812, it would also be helpful if you can find out when it broke exactly, maybe bisect I might be wrong but I have a feeling this issue stems from something other than fzf-lua. |
Any chance it could be mfussenegger/nvim-jdtls#453 ? Although i am using jt.ls 1.22 |
I really can’t tell, never used Java, I only tried to install it for this issue. |
Seems to have been another plugin which was causing issues in the buffer. Unrelated. @ibhagwan but on the same note, something strange that i noticed, while browsing workspace symbols (say HashMap.class form java util, opened as jdt:// resource) and if i have that one open and a vertical split with another class from local project open, if i open the go to symbols fzf picker and select a function or a symbol from the buffer / window where HashMap, is opened, the other split window (the local project window) is closed and i am left only with the HashMap window / buffer. Tried removing pretty much all relevant plugins, to no avail. Don't want to open a new issue though. |
@asmodeus812, that is probably because the previewer uses |
I am not sure nvim jdtls even interfaces with symbols at all, but this recent change seems to change that mfussenegger/nvim-jdtls@f8fb45e#diff-cf51be59b2547129144014a9d62c2c686dece7eb590cd6a6f429cab5c58541c0. The autocmd is concerning me. |
Any |
I see, tried hard resetting to even older commit for jdtls - a71e656a553f0af306cffc81400f08dcedf295d6 like that one but still seeing the same issue |
I’m not sure of there is a solution to this without changes to nvim-jdtls or having fzf-lua call an internal nvim-jdtls API that doesn’t reuse the buffer. |
You can test my theory by calling |
Not sure we are on the same page, even if the buffer i am currently looking pointing at a jdt:// resource at is getting reused (which is fine i don't mind it using the same buffer to jump somewhere else), the issue is why would it close all other windows/splits that i have open pointing at local files (buffers to those files are loaded, but windows get closed, all but the one with the jdt:// resource). I am trying to identify where it broke, i haven't had issues like that, the only change that springs to mind is upgrading to nvim 0.9, reverting both fzf-lua and jdtls to releases from 2 months ago does not fix the issue Okay, reverted to 8.3, same issue, but here is an observation, if i have 3 horizontal splits, and have the jdt resource (opened from workspace_symbols) open in the middle one, if i navigate to a symbol (with document_symbols) within that one the split above the jdt:// split will get closed and the one below stays. So it does not close all windows, but something weird is going on, i did nuke pretty much all plugins away, save for lsp and fzf. Can you think of Any other lsp that uses remote uri resources like that, to at least identify where the problem lies. Most refer to actual files on the file system and those cases work, the window layout is not getting fubar'd |
I’m unsure when this broke as I’m not a Java user but the only thing that differs with jdtls is the use of |
@ibhagwan okay tried to use the native navigation without fzf-lua this time, the one that by default works with quickfix lists for symbols, that one navigates correctly it seems. Where / how it vim.lsp.util.jump_to_location used with fzf lua ? |
In order to view the contents of the jdt link, fzf-lua previewer will call jump to location, can you try with |
Okay here is another observation, with previewer, when i open the symbols picker and i don't move up or down, just immediately then it navigates in the same file without destroying the layout, which is what i would expect should happen. Also note that when scrolling up/down (to force the issue) and the layout gets destroyed, it seems like the entire jdt://resource is getting read anew. There is significant delay between and the cursor being positioned at the location. I suspect maybe the buffer gets unlisted and resource read again. With previewer = false, it does indeed work as expected, yes, you can scroll up or down and navigate to each one, and navigating to any symbol is fast as it used to be. |
There's not much I can do about this from fzf-lua's side, the only way I can consistently view internal jar file definitions is by calling
Confirming my initial suspection this was Unfortuantely, I can't do much more than this, the rest will have to be dealth with via |
That one sadly does not work, it jumps to the buffer but the events to decompile the jar do no trigger so the buffer is empty, the previewers however still show up the decompiled version .The change in that branch though seems to be on the action not the previewer ?
I am okay indeed, as long we understand the problem at hand at detail we can deal with it in nvim-jdtls, @mfussenegger
Just to add something that could also be helpful (on master) with preview, when opening the split layout, and browsing for symbols in the jdt:// buffer, even an attempt to filter on those symbols in fzf in the list will result in the jdt window getting closed. |
Oops I did it in a rush from the mobile :-) Can you pull rebase the branch and try again? but I suspect the previewer will be empty due to this:
This further confirms the unintended consequences of
This is probably the best way forward, not much more I can do from fzf-lua's end. |
I configured the repro scenario in this repository using nvim-jdtls and fzf-lua, but I was unable to reproduce the issue.. May you try? You only need a Java 17 installed and $JAVA_HOME setted to it, before running |
@GiuseppeMP, as I mentioned in the other issue I am unable to setup As for the issue in the OP, this only happens with Java class references that comes from |
The repro.lua will install the jdtls and nvim-jdtls and configure them for you. |
I don’t have an issue with setup, I have an issue with the eclipse LSP client crashing, I’ll try the command inside your repo and see if that helps. |
Ty for the repo @GiuseppeMP, my In any event, I wasn't able to reproduce the same issue with said However, scrolling between I'm going to try and fix my |
That's great! I'm glad that helped! |
@GiuseppeMP, FYI mfussenegger/nvim-jdtls#459 (comment), now I can finally solve this issue, ty :-) |
@asmodeus812 , @GiuseppeMP - latest commits should fix this. Let me know if this solves it for you as well? |
@ibhagwan Works for me! 👏🏾 |
Fantastic, ty for the update @GiuseppeMP! |
So Or is there any way to also make this work with FZF native previewer? I prefer the latter as it's way more snappy. |
Unfortunately there not possible, previewing the jdt entries requires having nvim-jdtls installed and calling LSP go to location API which can’t work it’s an external binary. |
Info
nvim --version
: 0.9fzf --version
: 0.39Opening the previewer for workspace / global symbols and searching for say hashmap or collections, any of the standard java lib classes yields this error below. This was working fine before i updated fzf though, so not sure if its due to neovimd 0.9 or something changed in fzf recently.
Description
The text was updated successfully, but these errors were encountered: