Skip to content

Instantly share code, notes, and snippets.

@jouderianjr
Created November 27, 2019 15:03
Show Gist options
  • Save jouderianjr/907543ebd266c4abaccff2d7e8d13b60 to your computer and use it in GitHub Desktop.
Save jouderianjr/907543ebd266c4abaccff2d7e8d13b60 to your computer and use it in GitHub Desktop.
call plug#begin()
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'tpope/vim-surround'
Plug 'scrooloose/nerdtree'
Plug 'junegunn/fzf'
" Syntax highlighting
Plug 'andys8/vim-elm-syntax', { 'for': ['elm'] }
" Language server client
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
"Plug 'elmcast/elm-vim'
Plug 'neovimhaskell/haskell-vim'
Plug 'w0rp/ale'
Plug 'morhetz/gruvbox'
Plug 'gabesoft/vim-ags'
Plug 'easymotion/vim-easymotion'
Plug 'scrooloose/nerdcommenter'
Plug 'scrooloose/syntastic'
"Plug 'valloric/youcompleteme'
Plug 'sheerun/vim-polyglot'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
call plug#end()
"let mapleader=','
"testando
nmap <silent> ,a <Plug>(coc-diagnostic-next)
nmap <silent> ,d <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gr <Plug>(coc-references)
nmap <silent> ,g <Plug>(coc-diagnostic-next)
" Use K to show documentation in preview window
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
" Show all diagnostics
nnoremap <silent> <space>a :<C-u>CocList diagnostics<cr>
" Use tab for trigger completion with characters ahead and navigate.
" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
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 <c-space> to trigger completion.
inoremap <silent><expr> <c-space> coc#refresh()
"fim testando
map ,p :NERDTreeToggle<CR>
map ,n :NERDTreeFind<CR>
map ; :FZF<CR>
map ,f :Ags
map ,, :e#<CR>
map ,c <Plug>(easymotion-s)
map ,, :e#<CR>
map ,w :w<CR>
map ,q :q<CR>
map <F3> <ESC>
map! <F3> <ESC>
inoremap <C-F> <C-R>"
" Refresh all buffers
nnoremap <F5> :checktime<CR>
" Turn off highlight match on press enter
nnoremap <CR> :noh<CR><CR>
"Copy to clipboard on selection+Y
noremap Y "*y
noremap P "*p
set background=dark " Setting dark mode
"set number
set relativenumber
set tabstop=4
set shiftwidth=4
set expandtab
set ignorecase " searches are case insensitive...
set smartcase " unless they contain at least one capital letter
colorscheme gruvbox
let g:ale_fix_on_save = 1
let NERDTreeMinimalUI = 1
let NERDTreeDirArrows = 1
let NERDTreeShowHidden = 1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:elm_syntastic_show_warnings = 1
let g:ycm_semantic_triggers = {
\ 'elm' : ['.'],
\}
let g:airline_theme='bubblegum'
let g:airline_powerline_fonts = 1
" from Ryan florence -> https://gist.github.com/ryanflorence/6d92b7495873263aec0b4e3c299b3bd3
" Keep the error column always visible (jumpy when linter runs on input)
:set signcolumn=yes
" Show syntax highlighting groups for word under cursor
nmap <C-S-P> :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
" Trigger configuration. Do not use <tab> if you use https://github.com/Valloric/YouCompleteMe.
let g:UltiSnipsExpandTrigger="<c-b>"
let g:UltiSnipsJumpForwardTrigger="<c-x>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment