summaryrefslogtreecommitdiff
path: root/.config/nvim/init.vim
blob: 755b8c97b6aa5e93d514ab6073e81382b735ff2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
set nocompatible
" Scripts-----------------------------
" Required:
set runtimepath+=/home/paul/.local/share/dein/repos/github.com/Shougo/dein.vim

" Required:
if dein#load_state('/home/paul/.local/share/dein')
  call dein#begin('/home/paul/.local/share/dein')

  " Let dein manage dein
  " Required:
  call dein#add('/home/paul/.local/share/dein/repos/github.com/Shougo/dein.vim')

  " Add or remove your plugins here:
  " After removing a plugin you should call:
  "     call map(dein#check_clean(), "delete(v:val, 'rf')")
  "     call dein#recache_runtimepath()

  call dein#add('Shougo/neosnippet.vim')
  call dein#add('Shougo/neosnippet-snippets')
  call dein#add('Shougo/denite.nvim')
  call dein#add('Shougo/defx.nvim')

  call dein#add('vim-airline/vim-airline')
  call dein#add('vim-airline/vim-airline-themes')

  call dein#add('tpope/vim-fugitive')
  call dein#add('tpope/vim-commentary')
  call dein#add('tpope/vim-obsession')
  call dein#add('tpope/vim-abolish')
  call dein#add('tpope/vim-unimpaired')
  call dein#add('tpope/vim-dispatch')

  call dein#add('machakann/vim-sandwich')

  call dein#add('AndrewRadev/splitjoin.vim')
  call dein#add('wellle/targets.vim')
  call dein#add('justinmk/vim-sneak')

  call dein#add('dpelle/vim-LanguageTool')
  call dein#add('lervag/vimtex')
  call dein#add('junegunn/goyo.vim')
  call dein#add('wsdjeg/FlyGrep.vim')
  call dein#add('junegunn/vim-easy-align')

  " Additional Colorschemes
  call dein#add('NLKNguyen/papercolor-theme')
  call dein#add('noahfrederick/vim-hemisu')
  call dein#add('srcery-colors/srcery-vim')

  " Required:
  call dein#end()
  call dein#save_state()
endif

" Required:
filetype plugin indent on
syntax enable

" If you want to install not installed plugins on startup.
"if dein#check_install()
"  call dein#install()
"endif

"End dein Scripts-------------------------

set number relativenumber
augroup numbertoggle
  autocmd!
  autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
  autocmd BufLeave,FocusLost,InsertEnter   * set norelativenumber
augroup END

set expandtab
set tabstop=2
set tw=80
set shiftwidth=2
set t_Co=256
colorscheme PaperColor
set laststatus=2
set wildoptions=

let g:airline#extensions#tabline#enabled = 1
let g:airline_powerline_fonts = 1
let g:airline_extensions = ['coc', 'tabline']

let g:tex_fold_enabled = 1

set list
set showbreak=↪\ 
set listchars=tab:→\ ,nbsp:␣,trail:•,extends:⟩,precedes:⟨
set fillchars=fold:\ 

map <silent> <F5> "<Esc>:silent setlocal spell! spelllang=en<CR>"
map <silent> <F6> "<Esc>:silent setlocal spell! spelllang=fr<CR>"

hi clear SpellBad
hi SpellBad cterm=underline

let g:languagetool_jar = "/home/paul/.local/repos/languagetool/languagetool-standalone/target/LanguageTool-4.6-SNAPSHOT/LanguageTool-4.6-SNAPSHOT/languagetool-commandline.jar"

let g:tex_flavor  = "latex"
let g:goyo_width  = "80"
let g:goyo_height = "95%"

" Define mappings
autocmd FileType denite call s:denite_my_settings()
function! s:denite_my_settings() abort
  nnoremap <silent><buffer><expr> <CR>
        \ denite#do_map('do_action')
  nnoremap <silent><buffer><expr> d
        \ denite#do_map('do_action', 'delete')
  nnoremap <silent><buffer><expr> p
        \ denite#do_map('do_action', 'preview')
  nnoremap <silent><buffer><expr> q
        \ denite#do_map('quit')
  nnoremap <silent><buffer><expr> i
        \ denite#do_map('open_filter_buffer')
  nnoremap <silent><buffer><expr> <Space>
        \ denite#do_map('toggle_select').'j'
endfunction

noremap <Space> <nop>
vnoremap <Space> <nop>
map <Space> <Leader>

" Start interactive EasyAlign in visual mode (e.g. vip<Enter>)
vmap <Enter> <Plug>(EasyAlign)

" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)

" 2-character Sneak (default)
nmap <tab> <Plug>Sneak_s
nmap <s-tab> <Plug>Sneak_S
" visual-mode
xmap <tab> <Plug>Sneak_s
xmap <s-tab>  <Plug>Sneak_S
" operator-pending-mode
omap <tab> <Plug>Sneak_s
omap <s-tab>  <Plug>Sneak_S

nnoremap ;i <c-i>
nnoremap ;o <c-o>