hoversplit.nvim is a Neovim plugin designed to enhance the Language Server Protocol (LSP) experience by providing hover information in a split window. With this plugin, you can quickly access additional context, documentation, or information related to code symbols directly within your editor without disrupting your workflow.
- Hover Information: Get detailed hover information about symbols, functions, types, and more in a separate split window.
- Auto Update: The content automatically updates as the cursor moves to new targets.
- Flexible Display: Choose between horizontal and vertical splits
- Flexible Focus: Control whether the cursor remains focused on the split or returns to the original buffer.
- Toggle Splits: Easily toggle the split window open and closed using configurable key bindings.
You can install hoversplit.nvim using your preferred plugin manager. Here's an example for LazyVim:
{
"roobert/hoversplit.nvim",
config = function()
require("hoversplit").setup()
end
}
You can configure key bindings for different functionalities. Here's an example configuration:
{
"roobert/hoversplit.nvim",
config = function()
require("hoversplit").setup({
key_bindings = {
split_remain_focused = "<leader>hs",
vsplit_remain_focused = "<leader>hv",
split = "<leader>hS",
vsplit = "<leader>hV",
},
})
end,
}
- split: Opens a horizontal split with hover information, focusing on the split.
- vsplit: Opens a vertical split with hover information, focusing on the split.
- split_remain_focused: Opens a horizontal split without moving the focus from the original buffer.
- vsplit_remain_focused: Opens a vertical split without moving the focus from the original buffer.