-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
[FEATURE]: Toggle single preview window and show definition automatically when cursor moving in source window. #96
Labels
enhancement
New feature or request
Comments
Hey, it's an interesting idea. Though if the feature is built it should be easily disabled since it can fairly easily get in the way. Until then, you can setup something yourself. Somewhere in your lua config: local group = vim.api.nvim_create_augroup("constant_peek", {})
vim.api.nvim_create_autocmd("CursorHold", {
pattern = { "*.*" },
group = group,
callback = function()
require("goto-preview").goto_preview_definition {
focus_on_open = false,
dismiss_on_move = true,
}
end,
}) |
Hey
|
Hi,
My options:
Screenshots:
![]()
![]() |
Hey @weiyshay would you mind recording a video? I'm still not sure I get what issue you're running into or what exactly you're trying to accomplish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When reading the code of a completely new project, it is convenient to keep the 'Definition preview' toggled and jump along with the cursor moving in the source code window, in particular with a wide screen which is spacious to have the source window in the left and the preview window in the right.
Invoke/Close 'Goto definition' manually is a bit time-consuming in the case, it will be nice to have an option to enable this feature.
Describe the solution you'd like
Using a single preview window and toggle it, jump to definition automatically by tracing the cursor moving events in the source window.
Describe alternatives you've considered
'srcexpl' in vim plugin, or manually open/close the preview window with shortcuts in neovim.
Additional context
N/A
The text was updated successfully, but these errors were encountered: