Last active
July 28, 2021 12:52
-
-
Save eberfreitas/dd8d997aba7b0bbe516949a5d19c4589 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
call plug#begin('~/.vim/plugged') | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'junegunn/fzf' | |
Plug 'junegunn/fzf.vim' | |
Plug 'andys8/vim-elm-syntax' | |
Plug 'scrooloose/nerdtree' | |
Plug 'Xuyuanp/nerdtree-git-plugin' | |
Plug 'NLKNguyen/papercolor-theme' | |
Plug 'janko/vim-test' | |
Plug 'elixir-editors/vim-elixir' | |
Plug 'tpope/vim-fugitive' | |
Plug 'raimondi/delimitmate' | |
Plug 'wakatime/vim-wakatime' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
Plug 'editorconfig/editorconfig-vim' | |
Plug 'mhinz/vim-mix-format' | |
Plug 'mattn/emmet-vim' | |
Plug 'stanangeloff/php.vim' | |
Plug 'tpope/vim-surround' | |
Plug 'tpope/vim-commentary' | |
Plug 'justinmk/vim-sneak' | |
Plug 'morhetz/gruvbox' | |
Plug 'severin-lemaignan/vim-minimap' | |
call plug#end() | |
set hidden | |
set number | |
set relativenumber | |
set list | |
set listchars=tab:→\ ,space:·,nbsp:␣,trail:•,eol:¶,precedes:«,extends:» | |
set ruler | |
set nosmd | |
set cursorline | |
set cc=120 | |
set t_Co=256 | |
set bg=dark | |
colorscheme gruvbox | |
let mapleader=" " | |
nnoremap <C-k> :bn<cr> | |
nnoremap <C-j> :bp<cr> | |
nnoremap <C-x> :bd<cr> | |
nnoremap <C-s> :w<cr> | |
nnoremap <A-j> <C-e> | |
nnoremap <A-k> <C-y> | |
nnoremap <leader>e :NERDTreeToggle<cr> | |
nnoremap <leader>; :CocList outline<cr> | |
nnoremap <leader>' :CocList outline<cr> | |
nnoremap <leader>p :FZF<cr> | |
nnoremap <leader>o :FZF<cr> | |
nmap <Esc> :noh<cr> | |
noremap <Up> <Nop> | |
noremap <Down> <Nop> | |
noremap <Left> <Nop> | |
noremap <Right> <Nop> | |
noremap <PageUp> <Nop> | |
noremap <PageDown> <Nop> | |
noremap <End> <Nop> | |
noremap <Home> <Nop> | |
nnoremap <Space> <Nop> | |
" Soft tabs | |
set tabstop=4 | |
set softtabstop=0 | |
set shiftwidth=4 | |
set expandtab | |
" Specific spaces for different file types | |
autocmd FileType javascript,typescript,css setlocal tabstop=2 expandtab shiftwidth=2 softtabstop=2 | |
" https://github.com/neoclide/coc.nvim#example-vim-configuration | |
" Some servers have issues with backup files, see #649. | |
set nobackup | |
set nowritebackup | |
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable | |
" delays and poor user experience. | |
set updatetime=300 | |
" Don't pass messages to |ins-completion-menu|. | |
set shortmess+=c | |
" Always show the signcolumn, otherwise it would shift the text each time | |
" diagnostics appear/become resolved. | |
" set signcolumn=yes | |
set signcolumn=auto:2 | |
" Use tab for trigger completion with characters ahead and navigate. | |
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by | |
" other plugin before putting this into your config. | |
inoremap <silent><expr> <TAB> | |
\ pumvisible() ? "\<C-n>" : | |
\ <SID>check_back_space() ? "\<TAB>" : | |
\ coc#refresh() | |
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" | |
function! s:check_back_space() abort | |
let col = col('.') - 1 | |
return !col || getline('.')[col - 1] =~# '\s' | |
endfunction | |
" Use `[g` and `]g` to navigate diagnostics | |
nmap <silent> [g <Plug>(coc-diagnostic-prev) | |
nmap <silent> ]g <Plug>(coc-diagnostic-next) | |
" GoTo code navigation. | |
nmap <silent> gd <Plug>(coc-definition) | |
nmap <silent> gy <Plug>(coc-type-definition) | |
nmap <silent> gi <Plug>(coc-implementation) | |
nmap <silent> gr <Plug>(coc-references) | |
nnoremap <silent> K :call <SID>show_documentation()<CR> | |
function! s:show_documentation() | |
if (index(['vim','help'], &filetype) >= 0) | |
execute 'h '.expand('<cword>') | |
else | |
call CocAction('doHover') | |
endif | |
endfunction | |
" https://github.com/vim-airline/vim-airline#integrating-with-powerline-fonts | |
let g:airline_powerline_fonts = 1 | |
let g:airline#extensions#tabline#enabled = 1 | |
" https://github.com/mhinz/vim-mix-format#options | |
let g:mix_format_on_save = 0 | |
let g:mix_format_silent_errors = 1 | |
" https://github.com/justinmk/vim-sneak | |
let g:sneak#label = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment