LukasPietzschmann/boo.nvim

github github
lspneovim-0.5
stars 29
issues 0
subscribers 1
forks 0
CREATED

2024-03-07

UPDATED

2 months ago


Boo 👻

Quickly pop-up some lsp-powered information of the thing your cursor is on.

Installation

Install boo with your favorite package manager.

lazy.nvim

{
    'LukasPietzschmann/boo.nvim',
    opts = {
        -- here goes your config :)
    },
}

Others

With other package managers, you probably need to call the setup function yourself:

require('boo').setup({
    -- here goes your config :)
})

Usage

  1. You have to load boo
local boo = require('boo')
  1. Then, you can call the boo function, which will show the pop-up
boo.boo()
  1. You can also manually close the pop-up with
boo.close()

Configuration

Here comes the default configuration with some explanation:

{
    -- win_opts will be used when creating the window. You can put everything here,
    -- that vim.api.nvim_open_win (https://neovim.io/doc/user/api.html#nvim_open_win())
    -- can handle.
    win_opts = {
        title = 'LSP Info',
        title_pos = 'center',
        relative = 'cursor',
        row = 1,
        col = 0,
        style = 'minimal',
        border = 'rounded',
        focusable = true,
    },
    -- The window will not be wider than max_width (in character cells)
    max_width = 80,
    -- The window will not be taller than max_height (in character cells)
    max_height = 20,
    -- When the boo window is focused, pressing one of these will close it.
    -- They will only be mapped in normalmode
    escape_mappings = { 'q', '<esc>' },
    -- Focus boo's window automatically after it's created
    focus_on_open = true,
    -- When the boo window is focused, and you'll focus another buffer,
    -- the window will be closed when this is set to true
    close_on_leave = true,
    -- When moving the cursor in the buffer that boo was opened from, boo
    -- will be closed. This makes most sense when paired with
    -- `focus_on_open = false`
    close_on_mouse_move = true,
}