-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbuddy.lua
50 lines (46 loc) · 1.15 KB
/
navbuddy.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
local M = {
"SmiteshP/nvim-navbuddy",
event = "VeryLazy",
dependencies = {
"SmiteshP/nvim-navic",
"MunifTanjim/nui.nvim",
},
}
function M.config()
local navbuddy = require "nvim-navbuddy"
local actions = require("nvim-navbuddy.actions")
navbuddy.setup {
window = {
border = "rounded",
size = "80%",
},
icons = require("user.lspicons").kind,
lsp = { auto_attach = true },
mappings = {
["<esc>"] = actions.close(),
["q"] = actions.close(),
["<Down>"] = actions.next_sibling(),
["<Up>"] = actions.previous_sibling(),
["<Right>"] = actions.children(),
["<Left>"] = actions.parent(),
["c"] = actions.comment(),
["s"] = actions.toggle_preview(),
["<C-v>"] = actions.vsplit(),
["t"] = actions.telescope({
layout_config = {
height = 0.60,
width = 0.60,
prompt_position = "top",
preview_width = 0.50
},
layout_strategy = "horizontal"
}),
["g?"] = actions.help(),
},
}
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_set_keymap
keymap("n", "<m-s>", ":silent only | Navbuddy<cr>", opts)
keymap("n", "<m-o>", ":silent only | Navbuddy<cr>", opts)
end
return M