109 lines
2.7 KiB
VimL
109 lines
2.7 KiB
VimL
set nocompatible
|
|
filetype on
|
|
filetype plugin on
|
|
filetype indent on
|
|
syntax on
|
|
set number
|
|
set cursorline
|
|
set tabstop=4
|
|
set nobackup
|
|
set nowrap
|
|
set incsearch
|
|
set ignorecase
|
|
set smartcase
|
|
set showcmd
|
|
set showmode
|
|
set showmatch
|
|
set hlsearch
|
|
set nowritebackup
|
|
set encoding=utf-8
|
|
set updatetime=300
|
|
set signcolumn=yes
|
|
|
|
|
|
" PLUGINS ---------------------------------------------------------------- {{{
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
Plug 'sheerun/vim-polyglot'
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
Plug 'tpope/vim-sensible'
|
|
Plug 'preservim/nerdtree'
|
|
Plug 'jiangmiao/auto-pairs'
|
|
"Plug 'rrethy/vim-hexokinase', {'do': 'make hexokinase'}
|
|
Plug 'joshdick/onedark.vim'
|
|
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
"#https://vimawesome.com/plugin/syntastic
|
|
"#https://vimawesome.com/plugin/vim-airline-superman
|
|
"#supertab OU coc pour autocompletion avec tab
|
|
"#https://vimawesome.com/plugin/fswitch
|
|
call plug#end()
|
|
" }}}
|
|
|
|
|
|
" MAPPINGS --------------------------------------------------------------- {{{
|
|
|
|
" Mappings code goes here.
|
|
"inoremap <silent><expr> <TAB> coc#pum#visible() ? coc#pum#confirm()
|
|
" \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
|
|
|
" Use K to show documentation in preview window
|
|
nnoremap <silent> K :call ShowDocumentation()<CR>
|
|
|
|
function! ShowDocumentation()
|
|
if CocAction('hasProvider', 'hover')
|
|
call CocActionAsync('doHover')
|
|
else
|
|
call feedkeys('K', 'in')
|
|
endif
|
|
endfunction
|
|
|
|
" Use <C-l> for trigger snippet expand.
|
|
"imap <C-l> <Plug>(coc-snippets-expand)
|
|
inoremap <silent><expr> <TAB>
|
|
\ pumvisible() ? coc#_select_confirm() :
|
|
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
|
|
\ <SID>check_back_space() ? "\<TAB>" :
|
|
\ coc#refresh()
|
|
|
|
function! s:check_back_space() abort
|
|
let col = col('.') - 1
|
|
return !col || getline('.')[col - 1] =~# '\s'
|
|
endfunction
|
|
|
|
let g:coc_snippet_next = '<tab>'
|
|
|
|
" Highlight the symbol and its references when holding the cursor
|
|
"autocmd * silent call CocActionAsync('highlight')
|
|
"inoremap <silent><expr> <TAB>
|
|
" \ coc#pum#visible() ? coc#pum#next(1) :
|
|
" \ CheckBackspace() ? "\<Tab>" :
|
|
" \ coc#refresh()
|
|
"inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
|
|
|
" }}}
|
|
|
|
|
|
" VIMSCRIPT -------------------------------------------------------------- {{{
|
|
|
|
" This will enable code folding.
|
|
" Use the marker method of folding.
|
|
"augroup filetype_vim
|
|
" autocmd!
|
|
" autocmd FileType vim setlocal foldmethod=marker
|
|
"augroup END
|
|
|
|
" More Vimscripts code goes here.
|
|
syntax on
|
|
colorscheme onedark
|
|
"let g:Hexokinase_highlighters = ['foreground']
|
|
" }}}
|
|
|
|
|
|
" STATUS LINE ------------------------------------------------------------ {{{
|
|
|
|
" Status bar code goes here.
|
|
|
|
" }}}
|
|
|