From 04681157c7374c073d1219f0c796756ec96c25bb Mon Sep 17 00:00:00 2001 From: triethyl Date: Thu, 19 Mar 2026 15:03:16 -0400 Subject: neovim: added code actions preview, new keybinds and pickers, better terminal keybind --- pkgs/custom-neovim/config/lua/plugins/actions-preview.lua | 9 +++++++++ pkgs/custom-neovim/config/lua/plugins/mini-files.lua | 13 ++++++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 pkgs/custom-neovim/config/lua/plugins/actions-preview.lua (limited to 'pkgs/custom-neovim/config/lua/plugins') diff --git a/pkgs/custom-neovim/config/lua/plugins/actions-preview.lua b/pkgs/custom-neovim/config/lua/plugins/actions-preview.lua new file mode 100644 index 0000000..e6562df --- /dev/null +++ b/pkgs/custom-neovim/config/lua/plugins/actions-preview.lua @@ -0,0 +1,9 @@ +return { + "actions-preview.nvim", + lazy = true, + after = function () + require("actions-preview").setup { + backend = {"minipick"}, + } + end +} diff --git a/pkgs/custom-neovim/config/lua/plugins/mini-files.lua b/pkgs/custom-neovim/config/lua/plugins/mini-files.lua index 9249a6c..b3c35ce 100644 --- a/pkgs/custom-neovim/config/lua/plugins/mini-files.lua +++ b/pkgs/custom-neovim/config/lua/plugins/mini-files.lua @@ -14,10 +14,16 @@ return { -- Add functionality -- Set focused directory as current working directory - local set_cwd = function() + local cd = function() local path = (MiniFiles.get_fs_entry() or {}).path if path == nil then return vim.notify('Cursor is not on valid entry') end - vim.fn.chdir(vim.fs.dirname(path)) + vim.cmd.cd(vim.fs.dirname(path)) + end + + local tcd = function() + local path = (MiniFiles.get_fs_entry() or {}).path + if path == nil then return vim.notify('Cursor is not on valid entry') end + vim.cmd.tcd(vim.fs.dirname(path)) end -- Yank in register full path of entry under cursor @@ -34,7 +40,8 @@ return { pattern = 'MiniFilesBufferCreate', callback = function(args) local b = args.data.buf_id - vim.keymap.set('n', 'g~', set_cwd, { buffer = b, desc = 'Set cwd' }) + vim.keymap.set('n', 'gl', tcd, { buffer = b, desc = 'Set tab cwd' }) + vim.keymap.set('n', 'gL', cd, { buffer = b, desc = 'Set cwd' }) vim.keymap.set('n', 'gX', ui_open, { buffer = b, desc = 'OS open' }) vim.keymap.set('n', 'gy', yank_path, { buffer = b, desc = 'Yank path' }) end, -- cgit v1.2.3