Skip to content

Commit

Permalink
bat themes
Browse files Browse the repository at this point in the history
  • Loading branch information
danwetherald committed Jan 14, 2021
1 parent 28583d2 commit e8420e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 34 deletions.
37 changes: 3 additions & 34 deletions nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,9 @@ call plug#begin('~/dotfiles/nvim/plugged')

let g:fzf_layout = { 'down': '~25%' }
let g:grepprg='rg --vimgrep'
let $FZF_DEFAULT_COMMAND = 'rg --files --follow -g "!{.config,etc,node_modules,.git,target,.reast,.d,.cm,.DS_Store,.bs.js}/*"'

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

let $FZF_DEFAULT_OPTS="--ansi --preview-window 'right:60%' --layout reverse --margin=1,4 --preview 'bat --color=always --style=header,grid --line-range :300 {}'"
let $FZF_DEFAULT_COMMAND = 'rg --files --ignore-case --follow -g "!{.config,etc,node_modules,.git,target,.reast,.d,.cm,.DS_Store,.bs.js}/*"'

command! -bang -nargs=* GGrep
\ call fzf#vim#grep(
Expand All @@ -425,8 +419,6 @@ call plug#begin('~/dotfiles/nvim/plugged')
return system('git rev-parse --show-toplevel 2> /dev/null')[:-2]
endfunction
command! ProjectFiles execute 'Files' s:find_git_root()

command! -nargs=* -bang RG call RipgrepFzf(<q-args>, <bang>0)

nmap <silent> <leader>t :ProjectFiles<cr>
nmap <silent> <leader>r :GGrep<cr>
Expand All @@ -440,29 +432,6 @@ call plug#begin('~/dotfiles/nvim/plugged')
imap <c-x><c-f> <plug>(fzf-complete-path)
imap <c-x><c-j> <plug>(fzf-complete-file-ag)
imap <c-x><c-l> <plug>(fzf-complete-line)
nnoremap <silent> <Leader>C :call fzf#run({
\ 'source':
\ map(split(globpath(&rtp, "colors/*.vim"), "\n"),
\ "substitute(fnamemodify(v:val, ':t'), '\\..\\{-}$', '', '')"),
\ 'sink': 'colo',
\ 'options': '+m',
\ 'left': 30
\ })<CR>
command! FZFMru call fzf#run({
\ 'source': v:oldfiles,
\ 'sink': 'e',
\ 'options': '-m -x +s',
\ 'down': '40%'})

command! -bang -nargs=* Find call fzf#vim#grep(
\ 'rg --column --line-number --no-heading --follow --color=always '.<q-args>, 1,
\ <bang>0 ? fzf#vim#with_preview('up:60%') : fzf#vim#with_preview('right:50%:hidden', '?'), <bang>0)
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview('right:50%', '?'), <bang>0)
command! -bang -nargs=? -complete=dir GitFiles
\ call fzf#vim#gitfiles(<q-args>, fzf#vim#with_preview('right:50%', '?'), <bang>0)
" }}}

" vim-fugitive {{{
Expand Down
3 changes: 3 additions & 0 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@ export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
test -d "${GOPATH}" || mkdir "${GOPATH}"
test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com"

## Bat
export BAT_THEME="OneDark"

0 comments on commit e8420e9

Please sign in to comment.