Installation

Ensure your environment meets the minimum requirement of Neovim >= 0.10.

Plugin Manager

Install the plugin using your preferred package manager. It is recommended to include rmagatti/logger.nvim as a dependency for better logging, though the plugin contains a fallback logger.

Lazy.nvim

{
  "rmagatti/goto-preview",
  dependencies = {
    "rmagatti/logger.nvim", -- Optional but recommended
  },
  event = "BufEnter",
  config = true, -- Calls require('goto-preview').setup()
}

Packer

use {
  'rmagatti/goto-preview',
  requires = {
    {'rmagatti/logger.nvim'}
  },
  config = function()
    require('goto-preview').setup {}
  end
}

Post-Installation Check

After installing, it is highly recommended to run the health check to verify that the plugin is loaded correctly and that your environment supports all features.

Run the following command in Neovim:

:checkhealth goto-preview

What this checks:

  • Neovim version compatibility.
  • Presence of logger.nvim.
  • Availability of reference providers (Telescope, fzf-lua, mini.pick, snacks).