Advertisement
Guest User

Untitled

a guest
Sep 11th, 2019
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.88 KB | None | 0 0
  1. " Thomas Hourlier
  2.  
  3. " Neovim {{{
  4. let g:loaded_ruby_provider = 0 " disable ruby extension support
  5. let g:python_host_prog = '/home/thomas.hourlier/.pyenv/versions/neovim2/bin/python'
  6. let g:python6_host_prog = '/home/thomas.hourlier/.pyenv/versions/neovim3/bin/python'
  7. " }}}
  8.  
  9. " General {{{
  10. set nocompatible
  11. set clipboard=unnamed
  12. set shell=/bin/zsh
  13. set undolevels=500
  14. set showtabline=2
  15. set encoding=UTF-8
  16. set showtabline=0
  17. filetype on
  18. xnoremap p pgvy
  19. set pastetoggle=<F2>
  20. set hidden
  21. set lazyredraw
  22. syntax enable
  23. set background=dark
  24. " }}}
  25.  
  26. " Plugins {{{
  27. call plug#begin('~/.local/share/nvim/plugged')
  28.  
  29. Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
  30. Plug 'junegunn/fzf.vim'
  31. Plug 'neoclide/coc.nvim', {'branch': 'release'}
  32. Plug 'sheerun/vim-polyglot'
  33.  
  34. call plug#end()
  35. " }}}
  36.  
  37. " Leader Key {{{
  38. let g:mapleader = ';'
  39. " }}}
  40.  
  41. " Completion {{{
  42. set wildmenu wildmode=full
  43. " }}}
  44.  
  45. " Leader Mapping {{{
  46.  
  47. " fuzzy file search
  48. nnoremap <C-p> :FZF<CR>
  49.  
  50. " }}}
  51.  
  52. " Plugin configurations {{{
  53.  
  54. " Coc.nvim {{{
  55.  
  56. " Use tab for trigger completion with characters ahead and navigate.
  57. inoremap <silent><expr> <TAB>
  58.       \ pumvisible() ? "\<C-n>" :
  59.       \ <SID>check_back_space() ? "\<TAB>" :
  60.       \ coc#refresh()
  61. inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
  62.  
  63. function! s:check_back_space() abort
  64.   let col = col('.') - 1
  65.   return !col || getline('.')[col - 1]  =~# '\s'
  66. endfunction
  67.  
  68. " Use <c-space> to trigger completion.
  69. inoremap <silent><expr> <c-space> coc#refresh()
  70.  
  71. " Don't give message like 1 match out of 3 when auto completing
  72. set shortmess+=c
  73.  
  74. " Remap keys for gotos
  75. nmap <silent> gd <Plug>(coc-definition)
  76.  
  77. " Remap for rename current word
  78. nmap <leader>rn <Plug>(coc-rename)<Paste>
  79.  
  80. " }}}
  81.  
  82. " FZF {{{
  83. let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore={.elixir_ls,node_modules,tmp,var,log,vendor,dist,.git} -l -g ""'
  84. " }}}
  85.  
  86. " }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement