Updates from linux

This commit is contained in:
Mariano Uvalle 2022-12-12 23:51:00 +00:00
parent 3c8146c4f0
commit ca5f071111
8 changed files with 175 additions and 38 deletions

View file

@ -27,6 +27,7 @@ vim.cmd(":set number relativenumber")
vim.cmd("autocmd FileType helm set nofixendofline")
vim.cmd("autocmd FileType yaml set nofixendofline")
vim.cmd("autocmd FileType yml set nofixendofline")
vim.cmd("autocmd BufReadPost * :lua require('gitsigns').setup()")
------ Folding
-- vim.o.foldlevel = 99
@ -64,4 +65,17 @@ function! FilenameForLightline()
endfunction
]])
-- Custom command for ripgrep.
vim.cmd([[
function! RipgrepFzf(query, fullscreen)
let command_fmt = 'rg --column --line-number --no-heading --color=always --smart-case -- %s || true'
let initial_command = printf(command_fmt, shellescape(a:query))
let reload_command = printf(command_fmt, '{q}')
let spec = {'options': ['--phony', '--query', a:query, '--bind', 'change:reload:'.reload_command]}
call fzf#vim#grep(initial_command, 1, fzf#vim#with_preview(spec), a:fullscreen)
endfunction
command! -nargs=* -bang RG call RipgrepFzf(<q-args>, <bang>0)
]])