summaryrefslogtreecommitdiff
path: root/mut/neovim
diff options
context:
space:
mode:
authorMike Vink <mike@pionative.com>2024-06-09 12:14:20 +0200
committerMike Vink <mike@pionative.com>2024-06-09 12:14:44 +0200
commit5013daa0e8b7e2db35d30f3c73b552b4f96b58c4 (patch)
tree6fc6d2a6b4090964619e29e6948aea0e8b457d5e /mut/neovim
parenta0d36ed6a666c14c0d92ce2732e23289771778f4 (diff)
fzf-tail
Diffstat (limited to 'mut/neovim')
-rw-r--r--mut/neovim/fnl/conf/init.fnl11
1 files changed, 11 insertions, 0 deletions
diff --git a/mut/neovim/fnl/conf/init.fnl b/mut/neovim/fnl/conf/init.fnl
index c5a3f86..da78287 100644
--- a/mut/neovim/fnl/conf/init.fnl
+++ b/mut/neovim/fnl/conf/init.fnl
@@ -85,6 +85,17 @@
(map :n "[x" ":lprevious<cr>")
(map :n "]x" ":lnext<cr>")
(map :n :<leader>xp #(fzf.files))
+ (map :n "<leader>:" #(do
+ (var keys "")
+ (if (not= (vim.opt_local.filetype:get) "oil")
+ (set keys (.. ":silent grep <c-r><c-w> " (vim.fn.bufname "%") "<c-f>B<left>i<space>"))
+ (do
+ (local f (vim.fn.bufname "%"))
+ (set keys (.. ":silent grep " (f:gsub "oil://" "") "<c-f>B<left>i<space>"))))
+ (vim.api.nvim_feedkeys
+ (vim.api.nvim_replace_termcodes
+ keys true false true)
+ :n false)))
(map :n "<leader>;" #(do
(var keys "")
(if (not= (vim.opt_local.filetype:get) "oil")