all repos — dotfiles @ d41acc1737de46361a9fc8b8cb79e541189d736f

my *nix dotfiles

nvim: return of fzy_ignore
Anirudh Oppiliappan x@icyphox.sh
Sat, 15 Jan 2022 15:35:01 +0530
commit

d41acc1737de46361a9fc8b8cb79e541189d736f

parent

4957a235fb16f0929806a5a9978f3d7029a1ce5d

1 files changed, 13 insertions(+), 1 deletions(-)

jump to
M config/nvim/lua/maps.luaconfig/nvim/lua/maps.lua

@@ -20,13 +20,25 @@ cmd(':command! Wqa wqa')

cmd(':command! W w') cmd(':command! Q q') +local function fzy_ignore(patterns) + pattern_cmd = {} + for _, p in ipairs(patterns) do + table.insert(pattern_cmd, string.format("! -path '%s'", p)) + end + + return table.concat(pattern_cmd, ' ') +end + -- fzy mappings if vim.fn.executable('fzy') then _G.fzy_edit = require('fzy.edit').fzy_edit map( '', '<leader>e', - ':call v:lua.fzy_edit("git ls-files")<cr>', + string.format( + ':call v:lua.fzy_edit("find -L . -type f %s | cut -c3-")<cr>', + fzy_ignore{'*.git/*', '*node_modules*', '*.pyc', '*migrations*'} + ), { noremap=true, silent=true } )