Skip to content

Commit

Permalink
feat(nvim): Tweak nvim-navbuddy mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Oct 30, 2023
1 parent f04a579 commit a762155
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion nvim/lua/my/configure/lspconfig.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local nvim_navbuddy_telescope
return {
'neovim/nvim-lspconfig',
dependencies = {
Expand Down Expand Up @@ -27,11 +28,23 @@ return {
},
opts = {
lsp = { auto_attach = true },
window = { sections = { right = { preview = 'always' } } },
mappings = {
-- structured like this to avoid having to `require('nvim-navbuddy')` during startup
['/'] = {
callback = function(display)
return require('nvim-navbuddy.actions').telescope().callback(display)
if nvim_navbuddy_telescope == nil then
nvim_navbuddy_telescope = require('nvim-navbuddy.actions').telescope({
layout_config = {
height = 0.60,
width = 0.60,
prompt_position = 'top',
preview_width = 0.50,
},
layout_strategy = 'horizontal',
})
end
return nvim_navbuddy_telescope.callback(display)
end,
description = 'Fuzzy search current level with telescope',
},
Expand Down

0 comments on commit a762155

Please sign in to comment.