Goto Preview

Goto Preview is a Neovim plugin that allows you to preview native LSP (Language Server Protocol) calls—such as goto definition, type definition, implementation, declaration, and references—in floating windows.

Instead of jumping your cursor away from your current context or opening a new split that disrupts your window layout, Goto Preview opens a small, dismissible floating window containing the target code.

Key Features

  • Floating Previews: View definitions and implementations without leaving your current buffer.
  • Window Stacking: recursivley open previews within previews (e.g., peek a definition, then peek a type inside that definition).
  • Multiple Reference Providers: Integrates with Telescope, fzf-lua, mini.pick, and Snacks for selecting references.
  • Customizable UI: Configure window dimensions, borders, opacity, and titles.
  • Native vim.ui.input Override: Optionally replace the command line input with a floating window input.

Showcase

Definition Preview:

Showcase

References List:

References

Requirements

  • Neovim: Version 0.10 or higher is strictly required.
  • LSP Server: An active LSP server must be attached to the buffer for the plugin to function.

Migration Note

If you are using Neovim < 0.10, you must upgrade your editor to use the latest version of this plugin. The current codebase utilizes simplified LSP handlers available only in 0.10+.