Commit 08356a36 authored by Franciszek Madej's avatar Franciszek Madej 🤞

add stuff

parent 9fb31535
......@@ -10,7 +10,7 @@ Xft.lcdfilter: lcddefault
! xft font
! URxvt*letterSpace:-1
! *.font:Fira Code:style=Bold:size=8
*.font:Iosevka TermLig Custom:size=10
*.font:Iosevka Nerd Font:size=10
! ui
URxvt*cursorUnderline: true
......
......@@ -39,6 +39,13 @@ set synmaxcol =200 " Only highlight the first 200 columns.
set wildmode =longest,full
set nobackup
set nowritebackup " CoC compatibility
set cmdheight=2 " Better display for messages
set updatetime=800 " Smaller updatetime for CursorHold & CursorHoldI
set shortmess+=c " don't give |ins-completion-menu| messages.
set clipboard=unnamedplus
" For a paranoia.
" Normally `:set nocp` is not needed, because it is done automatically
" when .vimrc is found.
......
......@@ -3,13 +3,16 @@ call dein#add('mhinz/vim-signify')
call dein#add('christoomey/vim-tmux-navigator')
call dein#add('roxma/vim-paste-easy')
call dein#add('junegunn/fzf')
call dein#add('junegunn/fzf.vim')
call dein#add('junegunn/goyo.vim')
call dein#add('junegunn/limelight.vim')
call dein#add('Shougo/neco-vim')
call dein#add('neoclide/coc-neco')
call dein#add('neoclide/coc.nvim', {'build': 'yarn install'})
call dein#add('Shougo/denite.nvim')
call dein#add('ryanoasis/vim-devicons')
call dein#add('scrooloose/nerdtree')
call dein#add('junegunn/fzf')
call dein#add('framallo/taskwarrior.vim')
......@@ -13,19 +13,52 @@ else
let &listchars = 'extends:>,precedes:<,nbsp:.'
endif
map <leader>f :Files .<CR>
map <leader>b :Buffers <CR>
nmap <leader>n :NERDTreeToggle <CR>
let g:NERDTreeMinimalUI = 1
" let g:NERDTreeStatusline = '%#NonText#'
let g:NERDTreeStatusline = ' '
" hide statusline for fzf buffer
autocmd! FileType fzf
autocmd FileType fzf set laststatus=0 noshowmode noruler
\| autocmd BufLeave <buffer> set laststatus=2 showmode ruler
" search through files in current directory
" omitting directories and files ignored by git
function! EditIconPrependedFile(item)
let l:file_path = a:item[4:-1]
execute 'silent e' l:file_path
endfunction
command! -bang Files
\ :call fzf#run({
\'sink': function('EditIconPrependedFile'),
\'source': 'fd --type f | devicon-lookup', 'down': '40%'
\})
nmap <leader>f :Files <CR>
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
" true color in tmux
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
command! -nargs=0 Prettier :call CocAction('runCommand', 'prettier.formatFile')
command! -nargs=0 Imports :call CocAction('runCommand', 'tsserver.organizeImports')
" Default event to trigger and update
let g:Hexokinase_refreshEvents = ['BufWritePost']
nmap <leader>oi :Imports <CR>
nmap <leader>rn <Plug>(coc-rename)
nmap <leader>gd <Plug>(coc-definition)
nmap <leader>gy <Plug>(coc-type-definition)
nmap <leader>gi <Plug>(coc-implementation)
nmap <leader>gr <Plug>(coc-references)
command! -nargs=0 Prettier :call CocAction('runCommand', 'prettier.formatFile')
nnoremap <leader>d :<C-u>CocList diagnostics<cr>
nnoremap <leader>e :<C-u>CocList extensions<cr>
nnoremap <leader>c :<C-u>CocList commands<cr>
nnoremap <leader>o :<C-u>CocList outline<cr>
nnoremap <leader>s :<C-u>CocList -I symbols<cr>
nnoremap <leader>j :<C-u>CocNext<CR>
nnoremap <leader>k :<C-u>CocPrev<CR>
nnoremap <leader>p :<C-u>CocListResume<CR>
autocmd CursorHold * silent call CocAction('doHover')
......@@ -21,14 +21,15 @@ local color0E='#b48ead'
local color0F='#ab7967'
# Setting fd as the default source for fzf
export FZF_DEFAULT_COMMAND='fd --type f'
export FZF_DEFAULT_COMMAND='fd --type f | devicon-lookup'
export FZF_DEFAULT_OPTS="
--ansi
--preview \"echo {} | cut -c5- | xargs bat --style numbers | head -n 40\"
--color=bg+:$color01,bg:$color00,spinner:$color0C,hl:$color0D
--color=fg:$color04,header:$color0D,info:$color0A,pointer:$color0C
--color=marker:$color0C,fg+:$color06,prompt:$color0A,hl+:$color0D
--reverse
--preview 'file -bL --mime {} | rg text'
"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment