nvim-config11/lua/plugins/glance.lua

50 lines
1.9 KiB
Lua

return {
"dnlhc/glance.nvim",
config = function()
local glance = require("glance")
local actions = glance.actions
glance.setup({
border = {
enable = true,
},
folds = {
fold_closed = "",
fold_open = "",
folded = false, -- Automatically fold list on startup
},
mappings = {
list = {
["j"] = actions.next, -- Bring the cursor to the next item in the list
["k"] = actions.previous, -- Bring the cursor to the previous item in the list
["<Down>"] = actions.next,
["<Up>"] = actions.previous,
["J"] = actions.next_location,
["K"] = actions.previous_location,
["<C-u>"] = actions.preview_scroll_win(5),
["<C-d>"] = actions.preview_scroll_win(-5),
["v"] = actions.jump_vsplit,
["s"] = actions.jump_split,
["t"] = actions.jump_tab,
["<CR>"] = actions.jump,
["<TAB>"] = actions.enter_win("preview"), -- Focus preview window
["q"] = actions.close,
["Q"] = actions.close,
["<Esc>"] = actions.close,
["<C-q>"] = actions.quickfix,
-- ['<Esc>'] = false -- disable a mapping
},
preview = {
["Q"] = actions.close,
["q"] = actions.close,
["J"] = actions.next_location,
["K"] = actions.previous_location,
["<TAB>"] = actions.enter_win("list"), -- Focus list window
},
},
winbar = {
enable = false,
},
use_trouble_qf = true,
})
end
}