You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues of vscode-neovim
I can reproduce the issue with an empty init.vim/init.lua and no other vscode extensions (when applicable)
Neovim version (nvim -v)
0.9.1
Operating system/version
Windows 11
Describe the bug
When peeking definitions (vscode: editor.action.peekDefinition) or peeking references (editor.action.referenceSearch.trigger, editor.action.goToReferences with multiple results), a dialog opens up to select where you'd like to jump to. This appears to work correctly. Selecting an entry in the list and pressing enter is supposed to then move the view/cursor to the selected location. Sometimes this works, and other times not.
To me, it looks like it works when the selected line to jump to was already visible on screen without having to scroll around. If you select a line/location that would require scrolling up, your cursor instead disappears, the page doesn't scroll, and you can't move around in the file. Scrolling down works fine if you press enter twice. Pressing seems to fix the issue, but the cursor is left back where you originally were when searching references.
Steps To Reproduce
Tested using empty init.lua and only one other plugin.
Open a long file such that you have to scroll to see the top and bottom. You need a language plugin for this as well, since I don't think reference search and definitions work without one. I'm using sumneko's lua extension on a test lua file. I've got a local symbol declared at the top, and references to the symbol scattered across 80ish lines. Some near the top, middle and bottom to simulate a large code file.
Cursor over an instance of the symbol. Press gd (editor.action.revealDefinition). In my test file's case, you should be at the top of the page. This is working as expected.
Cursor over an instance of the symbol. Press gH (editor.action.referenceSearch.trigger). Select a reference that occurs later in the file, off the bottom of the screen using j/k, press enter. The window will jitter, your cursor disappears, and you don't scroll. Press enter again and you end up looking at your reference.
Cursor over an instance of the symbol. Press gH (editor.action.referenceSearch.trigger). Select a reference that occurs earlier in the file, off the top of the screen using j/k, press enter. The window will jitter, your cursor disappears, and you don't scroll. Press enter again for the window to jitter again.
Pressing escape doesn't bring you anywhere either, rather just back to where you were.
Expected Behavior
I'd expect that when selecting a reference from editor.action.referenceSearch.trigger by pressing enter, my cursor would be moved to the beginning of the reference and the view would be scrolled to see it.
Without the vscode-neovim plugin (so in my case only Lua extension) when I trigger editor.action.referenceSearch.trigger by either using Ctrl+Shift+P and typing it out or right clicking on the symbol and selecting Peek -> Peek References, I'm able to scroll around the pop up with arrow keys. Then I can press enter on a selection and my view is centered on the reference. Then I can press escape and my cursor is at the beginning of the reference.
The text was updated successfully, but these errors were encountered:
A supplemental GIF for bug reproduction is provided.
Currently on line 22, the 'gr' shortcut (customized as 'peek reference') is used to select the target on line 112, then 'enter' is pressed to jump there.
The effect is a jump to line 112 and a return to line 22. At this point, the cursor disappears, and after pressing 'esc,' it reappears at line 22.
@theol0403
I think the issue is not the same as #1027 because #1027 is occurring in version 0.0.91, but I has the issue in the current version 0.5.0
I switch to the older version of vscode-neovim and found that it does not has this issue in 0.3.2. I suspect this issue is introduced after 0.3.2.
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.1
Operating system/version
Windows 11
Describe the bug
When peeking definitions (vscode: editor.action.peekDefinition) or peeking references (editor.action.referenceSearch.trigger, editor.action.goToReferences with multiple results), a dialog opens up to select where you'd like to jump to. This appears to work correctly. Selecting an entry in the list and pressing enter is supposed to then move the view/cursor to the selected location. Sometimes this works, and other times not.
To me, it looks like it works when the selected line to jump to was already visible on screen without having to scroll around. If you select a line/location that would require scrolling up, your cursor instead disappears, the page doesn't scroll, and you can't move around in the file. Scrolling down works fine if you press enter twice. Pressing seems to fix the issue, but the cursor is left back where you originally were when searching references.
Steps To Reproduce
Tested using empty init.lua and only one other plugin.
Expected Behavior
I'd expect that when selecting a reference from editor.action.referenceSearch.trigger by pressing enter, my cursor would be moved to the beginning of the reference and the view would be scrolled to see it.
Without the vscode-neovim plugin (so in my case only Lua extension) when I trigger editor.action.referenceSearch.trigger by either using Ctrl+Shift+P and typing it out or right clicking on the symbol and selecting Peek -> Peek References, I'm able to scroll around the pop up with arrow keys. Then I can press enter on a selection and my view is centered on the reference. Then I can press escape and my cursor is at the beginning of the reference.
The text was updated successfully, but these errors were encountered: