Commit 5410f78e authored by hadret's avatar hadret

wip: initial denite, coc, deoplete and neosnippets import.

parent 8f8e93ac
......@@ -36,7 +36,7 @@ set tabpagemax=15 " only show 15 tabs
set showtabline=0 " always show tabbar
set noshowmode " don't show mode (handled by line-plug)
set cursorline " highlight current line
autocmd Filetype ruby setlocal nocursorline " disable cursorline for ruby files
set noshowcmd
if has('cmdline_info')
set ruler " show the ruler
......
......@@ -9,13 +9,32 @@ if empty(glob('~/.vim/autoload/plug.vim'))
endif
call plug#begin('~/.vim/bundle')
Plug 'airblade/vim-gitgutter'
" Install deoplete, denite etc.
Plug 'Shougo/deoplete.nvim'
Plug 'Shougo/denite.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
let g:deoplete#enable_at_startup = 1
" Snippets and code completion
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Git stuff
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
" Look'n'feel
Plug 'Shougo/echodoc.vim'
Plug 'ryanoasis/vim-devicons'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'chriskempson/tomorrow-theme'
Plug 'mhinz/vim-startify'
call plug#end()
filetype plugin indent on
......@@ -40,15 +59,65 @@ set termguicolors
let &t_8f="\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b="\<Esc>[48;2;%lu;%lu;%lum"
" denite
" heavily based on this one:
" https://github.com/ctaylo21/jarvis/blob/master/config/nvim/init.vim
call denite#custom#var('file/rec', 'command', ['rg', '--files', '--glob', '!.git'])
call denite#custom#var('grep', 'command', ['rg'])
call denite#custom#var('grep', 'default_opts', ['--hidden', '--vimgrep', '--heading', '-S'])
call denite#custom#var('grep', 'recursive_opts', [])
call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
call denite#custom#var('grep', 'separator', ['--'])
call denite#custom#var('grep', 'final_opts', [])
call denite#custom#var('buffer', 'date_format', '')
let s:denite_options = {'default' : {
\ 'split': 'floating',
\ 'start_filter': 1,
\ 'auto_resize': 1,
\ 'source_names': 'short',
\ 'prompt': 'λ ',
\ 'statusline': 0,
\ 'highlight_matched_char': 'QuickFixLine',
\ 'highlight_matched_range': 'Visual',
\ 'highlight_window_background': 'Visual',
\ 'highlight_filter_background': 'DiffAdd',
\ 'winrow': 1,
\ 'vertical_preview': 1
\ }}
"" Loop through denite options and enable them
function! s:profile(opts) abort
for l:fname in keys(a:opts)
for l:dopt in keys(a:opts[l:fname])
call denite#custom#option(l:fname, l:dopt, a:opts[l:fname][l:dopt])
endfor
endfor
endfunction
" coc
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
"" Close preview window when completion is done.
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
" neosnippets
imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
" airline
let g:bufferline_echo = 0
let g:airline_extensions = ['branch']
let g:airline_powerline_fonts = 0
" IndentLines
let g:indentLine_char = "│"
let g:indentLine_enabled = 0
" DevIcons
let g:webdevicons_enable_airline_tabline = 1
let g:webdevicons_enable_airline_statusline = 1
......
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