diff options
author | HampusM <hampus@hampusmat.com> | 2024-06-02 21:52:43 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-06-02 21:54:06 +0200 |
commit | 94f56f1e29f155a249ca87811ac53ad756f4e4f5 (patch) | |
tree | f8c2741b42959ae5e9bc1eccc835e2daf0fc4bc1 /lua | |
parent | bb21d2f482bc1bfd25b1de72846ce115114c6f27 (diff) |
revert "prevent terminal appearing in buffer search"
This reverts commit 0d380e8916a7ddf89193a76bd711ae1661ae9b44.
Diffstat (limited to 'lua')
-rw-r--r-- | lua/functions.lua | 18 | ||||
-rw-r--r-- | lua/maps/find.lua | 2 |
2 files changed, 1 insertions, 19 deletions
diff --git a/lua/functions.lua b/lua/functions.lua index ab903b1..aa5e32f 100644 --- a/lua/functions.lua +++ b/lua/functions.lua @@ -98,24 +98,6 @@ function _G.toggle_nerdtree() ) end -function _G.search_buffers() - local spec = vim.fn["fzf#vim#with_preview"]({ placeholder = "{1}" }) - - local nerdtree_buffer = vim.api.nvim_win_get_buf(get_nerdtree_win_id()) - - local buffers = table.filter( - vim.api.nvim_list_bufs(), - function(buffer) - return - vim.api.nvim_buf_is_loaded(buffer) and - buffer ~= nerdtree_buffer and - buffer ~= vim.g.term_buf - end - ) - - vim.fn["fzf#vim#buffers"]("", buffers, spec, 0) -end - function _G.get_current_file() return vim.fn.expand("%") end diff --git a/lua/maps/find.lua b/lua/maps/find.lua index dec634a..5d4bfbe 100644 --- a/lua/maps/find.lua +++ b/lua/maps/find.lua @@ -1,6 +1,6 @@ vim.api.nvim_set_keymap("n", "<leader>p", ":Files<CR>", { silent = true, noremap = true }) -vim.api.nvim_set_keymap("n", "<leader>b", ":lua search_buffers()<CR>", { silent = true, noremap = true }) +vim.api.nvim_set_keymap("n", "<leader>b", ":Buffers<CR>", { silent = true, noremap = true }) vim.api.nvim_set_keymap("n", "<leader>c", ":Commits<CR>", { silent = true, noremap = true }) |