2 Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'}
3 Plug 'Shougo/denite.nvim', { 'do': ':UpdateRemotePlugins' }
5 Plug 'Shougo/deoplete.nvim'
6 Plug 'Shougo/denite.nvim'
9 Plug 'roxma/vim-hug-neovim-rpc'
12 " java extension to deoplete
13 Plug 'artur-shaik/vim-javacomplete2', {'for': 'java'}
15 Plug 'neomake/neomake'
16 Plug 'puremourning/vimspector'
18 Plug 'kana/vim-operator-user'
19 Plug 'rhysd/vim-clang-format'
20 Plug 'justmao945/vim-clang', {'for': ['c', 'cpp', 'objc']}
22 " Prevent slow foling update, e.g., for vimtex
23 Plug 'Konfekt/FastFold'
26 Plug 'mhinz/vim-signify'
27 Plug 'tpope/vim-fugitive'
28 Plug 'gko/vim-coloresque'
30 Plug 'vimwiki/vimwiki'
31 Plug 'jceb/vim-orgmode', {'for': ['org']}
33 Plug 'cakebaker/scss-syntax.vim', {'for': 'scss'}
34 Plug 'hail2u/vim-css3-syntax', {'for': ['scss', 'css']}
36 Plug 'https://gitlab.com/dbeniamine/vim-mail'
37 Plug 'Konfekt/vim-DetectSpellLang', {'do': 'spell'}
38 Plug 'dpelle/vim-LanguageTool'
40 " Disable devicons on linux terminal
42 let g:enable_plugin_devicons=0
43 " Enable loading of devicons on all others
45 let g:enable_plugin_devicons=1
48 Plug 'ryanoasis/vim-devicons', Cond(g:enable_plugin_devicons)
49 Plug 'joom/latex-unicoder.vim'
50 Plug 'chrisbra/unicode.vim'
52 Plug 'sjl/splice.vim', {'on': 'SpliceInit'}
54 " Costs a second startup time
55 Plug 'dbeniamine/cheat.sh-vim', {'on': 'Cheat'}
57 Plug 'sheerun/vim-polyglot'
59 " neovim-0.4 has troubles with nvim-treesitter
61 " neovim-0.7 works untilk v0.8.0
63 Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
65 Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate', 'tag': 'v0.8.0'}
68 Plug 'nvim-treesitter/nvim-treesitter-refactor', {'do': ':TSUpdate'}
71 function PluginsNorootNolowendboxConfig()
72 let g:neomake_c_enabled_makers = ['clangtidy', 'clangcheck']
73 let g:neomake_cpp_enabled_makers = ['clangtidy', 'clangcheck']
74 let g:clang_compilation_database = '.'
78 call neomake#configure#automake('w')
80 call neomake#configure#automake('nw', 1000)
83 " Speedup deoplete startup time, see deoplete FAQ
84 let g:python3_host_prog = '/usr/bin/python3'
85 " deoplete requires huge startuptime. Delay loading upon first InsertEnter.
86 let g:deoplete#enable_at_startup = 0
87 call deoplete#custom#option({
88 \ 'smart_case' : v:true,
89 \ 'auto_refresh_delay' : 100,
91 au InsertEnter * call deoplete#enable()
93 " The denite settings are largely stolen from spacevim
94 let s:denite_options = {
100 \ 'highlight_matched_char' : 'MoreMsg',
101 \ 'highlight_matched_range' : 'MoreMsg',
102 \ 'direction': 'rightbelow',
105 augroup spacevim_layer_denite
107 autocmd FileType denite call s:denite_my_settings()
110 function! s:denite_my_settings() abort
111 nnoremap <silent><buffer><expr> i
112 \ denite#do_map('open_filter_buffer')
113 nnoremap <silent><buffer><expr> '
114 \ denite#do_map('toggle_select').'j'
115 nnoremap <silent><buffer><expr> q
116 \ denite#do_map('quit')
117 nnoremap <silent><buffer><expr> <C-t>
118 \ denite#do_map('do_action', 'tabopen')
119 nnoremap <silent><buffer><expr> <C-v>
120 \ denite#do_map('do_action', 'vsplit')
121 nnoremap <silent><buffer><expr> <C-s>
122 \ denite#do_map('do_action', 'split')
123 nnoremap <silent><buffer><expr> <CR>
124 \ denite#do_map('do_action')
125 nnoremap <silent><buffer><expr> p
126 \ denite#do_map('do_action', 'preview')
127 nnoremap <silent><buffer><Tab> j
128 nnoremap <silent><buffer><S-Tab> k
131 " FIND and GREP COMMANDS
133 " Ripgrep command on grep source
134 call denite#custom#var('grep', 'command', ['rg'])
135 call denite#custom#var('grep', 'default_opts',
136 \ ['--vimgrep', '--no-heading'])
137 call denite#custom#var('grep', 'recursive_opts', [])
138 call denite#custom#var('grep', 'pattern_opt', ['--regexp'])
139 call denite#custom#var('grep', 'separator', ['--'])
140 call denite#custom#var('grep', 'final_opts', [])
143 let s:insert_mode_mappings = [
144 \ ['jk', '<denite:enter_mode:normal>', 'noremap'],
145 \ ['<Tab>', '<denite:move_to_next_line>', 'noremap'],
146 \ ['<C-j>', '<denite:move_to_next_line>', 'noremap'],
147 \ ['<S-tab>', '<denite:move_to_previous_line>', 'noremap'],
148 \ ['<C-k>', '<denite:move_to_previous_line>', 'noremap'],
149 \ ['<C-t>', '<denite:do_action:tabopen>', 'noremap'],
150 \ ['<C-v>', '<denite:do_action:vsplit>', 'noremap'],
151 \ ['<C-s>', '<denite:do_action:split>', 'noremap'],
152 \ ['<Esc>', '<denite:enter_mode:normal>', 'noremap'],
153 \ ['<C-N>', '<denite:assign_next_matched_text>', 'noremap'],
154 \ ['<C-P>', '<denite:assign_previous_matched_text>', 'noremap'],
155 \ ['<Up>', '<denite:assign_previous_text>', 'noremap'],
156 \ ['<Down>', '<denite:assign_next_text>', 'noremap'],
157 \ ['<C-Y>', '<denite:redraw>', 'noremap'],
160 let s:normal_mode_mappings = [
161 \ ["'", '<denite:toggle_select_down>', 'noremap'],
162 \ ['<C-n>', '<denite:jump_to_next_source>', 'noremap'],
163 \ ['<C-p>', '<denite:jump_to_previous_source>', 'noremap'],
164 \ ['<Tab>', '<denite:move_to_next_line>', 'noremap'],
165 \ ['<C-j>', '<denite:move_to_next_line>', 'noremap'],
166 \ ['<S-tab>', '<denite:move_to_previous_line>', 'noremap'],
167 \ ['<C-k>', '<denite:move_to_previous_line>', 'noremap'],
168 \ ['gg', '<denite:move_to_first_line>', 'noremap'],
169 \ ['<C-t>', '<denite:do_action:tabopen>', 'noremap'],
170 \ ['<C-v>', '<denite:do_action:vsplit>', 'noremap'],
171 \ ['<C-s>', '<denite:do_action:split>', 'noremap'],
172 \ ['q', '<denite:quit>', 'noremap'],
173 \ ['r', '<denite:redraw>', 'noremap'],
176 " Have deoplete completion for vimtex (e.g., bibtex entries)
177 au Filetype tex call deoplete#custom#var('omni', 'input_patterns', {
178 \ 'tex': g:vimtex#re#deoplete })
181 set foldexpr=nvim_treesitter#foldexpr()
184 require'nvim-treesitter.configs'.setup {
186 ensure_installed = "all",
187 -- List of parsers to ignore installing
189 -- Modules and its options go here
190 highlight = { enable = true },
191 -- Indentation is still quite buggy, e.g., for multi-line C comments
192 -- or for comments right after a preproc definition.
193 -- indent = { enable = true },
194 textobjects = { enable = true },
195 incremental_selection = {
198 init_selection = "gnn",
199 node_incremental = "grn",
200 scope_incremental = "grc",
201 node_decremental = "grm",
205 highlight_definitions = { enable = true },
208 keymaps = { smart_rename = "grr" },
213 goto_definition = "gnd",
214 list_definitions = "gnD",
215 list_definitions_toc = "gO",
216 goto_next_usage = "<a-*>",
217 goto_previous_usage = "<a-#>",
225 let g:fastfold_minlines = 0
227 let g:detectspelllang_langs = {}
228 let g:detectspelllang_langs.aspell =[ 'en_US', 'de_AT']
230 " Try finding jar file. If it does not work, set cmd directly
231 let g:languagetool_jar='/snap/languagetool/current/usr/bin/languagetool-commandline.jar'
232 if !filereadable(g:languagetool_jar)
233 unlet! g:languagetool_jar
234 let g:languagetool_cmd='languagetool'
238 au FileType mail let g:VimMailSpellLangs=['de', 'en']
239 let g:VimMailContactsProvider=['khard']
240 let g:VimMailContactsCommands={
242 \{ 'query' : "khard email --parsable --search-in-source-files",
243 \'sync': "/bin/true"}
246 let g:org_todo_keywords = [['TODO(t)', 'WAITING(w)', '|', 'DONE(d)'],
247 \ ['|', 'OBSOLETE(o)', 'WONT(n)'],
250 let g:vimwiki_list = [{'path': '~/.vimwiki/',
251 \ 'template_path': '~/.vim/vimwiki/templates',
252 \ 'template_default': 'default',
253 \ 'template_ext': '.html'}]
254 let g:vimwiki_global_ext = 0
258 au FileType java setlocal omnifunc=javacomplete#Complete
259 au FileType java JCEnable
261 let g:vimtex_fold_enabled = 1
262 let g:vimtex_fold_levelmarker = '➜'
263 let g:vimtex_view_general_viewer = 'okular'
264 let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
265 let g:airline#extensions#vimtex#enabled = 1
267 au FileType c,cpp,objc,java,python packadd! vimspector
268 let g:vimspector_base_dir = expand('~/.vim/vimspector-config')
269 let g:vimspector_install_gadgets = [ 'debugpy', 'vscode-cpptools' ]
270 "let g:vimspector_enable_mappings = 'VISUAL_STUDIO'
272 function VimspectorRestartOrCreateConfig()
273 if !filereadable('.vimspector.json')
274 echo "Missing .vimspector.json, created one."
275 execute 'tabe .vimspector.json'
277 call vimspector#Restart()
281 nmap <leader>dc <Plug>VimspectorContinue
282 nmap <leader>ds <Plug>VimspectorStop
283 nmap <leader>dr :call VimspectorRestartOrCreateConfig()<CR>
284 "nmap <leader>dr :call vimspector#Restart()<CR>
285 nmap <leader>drr :call vimspector#Reset()<CR>
286 nmap <leader>dp <Plug>VimspectorPause
287 nmap <leader>db <Plug>VimspectorToggleBreakpoint
288 nmap <leader>dcb <Plug>VimspectorToggleConditionalBreakpoint
289 nmap <leader>dfb <Plug>VimspectorAddFunctionBreakpoint
290 nmap <leader>dtc <Plug>VimspectorRunToCursor
291 nmap <leader>do <Plug>VimspectorStepOver
292 nmap <leader>di <Plug>VimspectorStepInto
293 nmap <leader>dof <Plug>VimspectorStepOut
294 " for normal mode, the word under the cursor
295 nmap <Leader>de <Plug>VimspectorBalloonEval
296 " for visual mode, the visually selected text
297 xmap <Leader>de <Plug>VimspectorBalloonEval
299 au BufNewFile .vimspector.json read ~/.vim/vimspector-config/vimspector.json
301 " Do not show diagnostic window of vim-clang
302 let g:clang_diagsopt = ''
304 augroup ClangFormatSettings
306 au FileType c,cpp,objc,javascript,java,typescript,protobuf,cuda,vala
307 \ vmap <buffer><leader>cf <Plug>(operator-clang-format)
308 au FileType c,cpp,objc,javascript,java,typescript,protobuf,cuda,vala
309 \ nmap <buffer><leader>cf :ClangFormat<CR>