1 -- A simple popup display that provides breadcrumbs feature using LSP server
2 -- https://github.com/hasansujon786/nvim-navbuddy
9 local navbuddy = require("nvim-navbuddy")
10 local actions = require("nvim-navbuddy.actions")
13 border = "single", -- "rounded", "double", "solid", "none"
14 -- or an array with eight chars building up the border in a clockwise fashion
15 -- starting with the top-left corner. eg: { "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" }.
16 size = "60%", -- Or table format example: { height = "40%", width = "100%"}
17 position = "50%", -- Or table format example: { row = "100%", col = "0%"}
18 scrolloff = nil, -- scrolloff value within navbuddy window
22 border = nil, -- You can set border style for each section individually as well.
29 -- No size option for right most section. It fills to
32 preview = "leaf", -- Right section can show previews too.
33 -- Options: "leaf", "always" or "never"
41 leaf_selected = " → ",
73 -- If set to false, only mappings set by user are set.
74 -- Else default mappings are used for keys that are not set by user
75 use_default_mappings = true,
77 ["<esc>"] = actions.close(), -- Close and cursor to original location
78 ["q"] = actions.close(),
80 ["j"] = actions.next_sibling(), -- down
81 ["k"] = actions.previous_sibling(), -- up
83 ["h"] = actions.parent(), -- Move to left panel
84 ["l"] = actions.children(), -- Move to right panel
85 ["0"] = actions.root(), -- Move to first panel
87 ["v"] = actions.visual_name(), -- Visual selection of name
88 ["V"] = actions.visual_scope(), -- Visual selection of scope
90 ["y"] = actions.yank_name(), -- Yank the name to system clipboard "+
91 ["Y"] = actions.yank_scope(), -- Yank the scope to system clipboard "+
93 ["i"] = actions.insert_name(), -- Insert at start of name
94 ["I"] = actions.insert_scope(), -- Insert at start of scope
96 ["a"] = actions.append_name(), -- Insert at end of name
97 ["A"] = actions.append_scope(), -- Insert at end of scope
99 ["r"] = actions.rename(), -- Rename currently focused symbol
101 ["d"] = actions.delete(), -- Delete scope
103 ["f"] = actions.fold_create(), -- Create fold of current scope
104 ["F"] = actions.fold_delete(), -- Delete fold of current scope
106 ["c"] = actions.comment(), -- Comment out current scope
108 ["<enter>"] = actions.select(), -- Goto selected symbol
109 ["o"] = actions.select(),
111 ["J"] = actions.move_down(), -- Move focused node down
112 ["K"] = actions.move_up(), -- Move focused node up
114 ["s"] = actions.toggle_preview(), -- Show preview of current node
116 ["<C-v>"] = actions.vsplit(), -- Open selected node in a vertical split
117 ["<C-s>"] = actions.hsplit(), -- Open selected node in a horizontal split
119 ["t"] = actions.telescope({ -- Fuzzy finder at current level.
120 layout_config = { -- All options that can be
121 height = 0.60, -- passed to telescope.nvim's
122 width = 0.60, -- default can be passed here.
123 prompt_position = "top",
124 preview_width = 0.50,
126 layout_strategy = "horizontal",
129 ["g?"] = actions.help(), -- Open mappings help window
132 auto_attach = true, -- If set to true, you don't need to manually use attach function
133 preference = nil, -- list of lsp server names in order of preference
136 follow_node = true, -- Keep the current node in focus on the source buffer
137 highlight = true, -- Highlight the currently focused node
138 reorient = "smart", -- "smart", "top", "mid" or "none"
139 scrolloff = nil, -- scrolloff value when navbuddy is open
141 custom_hl_group = nil, -- "Visual" or any other hl group to use instead of inverted colors