summary refs log tree commit diff
path: root/.vim/after/plugin
diff options
context:
space:
mode:
Diffstat (limited to '.vim/after/plugin')
-rw-r--r--.vim/after/plugin/clap.vim8
-rw-r--r--.vim/after/plugin/neomake.vim50
-rw-r--r--.vim/after/plugin/writing.vim41
3 files changed, 41 insertions, 58 deletions
diff --git a/.vim/after/plugin/clap.vim b/.vim/after/plugin/clap.vim
deleted file mode 100644
index b5d48db..0000000
--- a/.vim/after/plugin/clap.vim
+++ /dev/null
@@ -1,8 +0,0 @@
-if !exists('g:loaded_clap')
-  finish
-endif
-
-let g:clap_selected_sign = { 'text': '* ', 'texthl': "WarningMsg", "linehl": "ClapSelected" }
-
-nnoremap <leader>cc :Clap<CR>
-nmap <leader>cg :Clap grep<CR>
diff --git a/.vim/after/plugin/neomake.vim b/.vim/after/plugin/neomake.vim
index 84af8c6..1e30a72 100644
--- a/.vim/after/plugin/neomake.vim
+++ b/.vim/after/plugin/neomake.vim
@@ -1,3 +1,4 @@
+finish
 if !exists('g:loaded_neomake')
   finish
 endif
@@ -12,6 +13,13 @@ let g:neomake_error_sign = {'text': '✘', 'texthl': 'NeomakeErrorSign'}
 let g:neomake_warning_sign = {'text': '‼', 'texthl': 'NeomakeWarningSign'}
 let g:neomake_message_sign = {'text': '☛', 'texthl': 'NeomakeMessageSign'}
 let g:neomake_info_sign = {'text': 'i', 'texthl': 'NeomakeInfoSign'}
+
+" make diagnosis-nvim match
+call sign_define("LspDiagnosticsErrorSign", {"text" : copy(g:neomake_error_sign.text), "texthl" : copy(g:neomake_error_sign.texthl)})
+call sign_define("LspDiagnosticsWarningSign", {"text" : copy(g:neomake_warning_sign.text), "texthl" : copy(g:neomake_warning_sign.texthl)})
+call sign_define("LspDiagnosticsHintSign", {"text" : copy(g:neomake_message_sign.text), "texthl" : copy(g:neomake_message_sign.texthl)})
+call sign_define("LspDiagnosticsInformationSign", {"text" : copy(g:neomake_info_sign.text), "texthl" : copy(g:neomake_info_sign.texthl)})
+
 " let g:neomake_serialize = 1
 
 let g:neomake_highlight_columns = 1
@@ -36,24 +44,30 @@ let g:neomake_make_maker = { 'exe': 'make', 'errorformat': '%f:%l:%c: %m' }
 
 nmap <leader>nm :Neomake<space>
 
-let g:lightline.component_function.neomake = 'LightLineNeomake'
-function! LightLineNeomake()
-  let l:msg = neomake#statusline#get(bufnr('%'), {
-    \ 'format_status_disabled': '{{disabled_info}} %s',
-    \ 'format_status_enabled': '%s',
-    \ 'format_running': '… {{running_job_names}}',
-    \ 'format_loclist_ok': ' ✔',
-    \ 'format_loclist_issues': '%s',
-    \ 'format_loclist_unknown': '',
-    \ 'format_loclist_type_E': ' ✘ {{count}}',
-    \ 'format_loclist_type_W': ' ‼ {{count}}',
-    \ 'format_loclist_type_I': ' i {{count}}',
-    \ 'format_quickfix_type_E': '✘ {{count}}',
-    \ 'format_quickfix_type_W': '‼ {{count}}',
-    \ 'format_quickfix_type_I': 'i {{count}}',
-  \ })
-  return l:msg ? 'nm:'.l:msg : ''
-endfunction
+if exists('g:loaded_lightline')
+    if exists('g:lightline')
+        let g:lightline.component_function.neomake = 'LightLineNeomake'
+    else
+        let g:lightline = {'component_function': {'neomake': 'LightLineNeomake'}}
+    endif
+    function! LightLineNeomake()
+    let l:msg = neomake#statusline#get(bufnr('%'), {
+        \ 'format_status_disabled': '{{disabled_info}} %s',
+        \ 'format_status_enabled': '%s',
+        \ 'format_running': '… {{running_job_names}}',
+        \ 'format_loclist_ok': ' ✔',
+        \ 'format_loclist_issues': '%s',
+        \ 'format_loclist_unknown': '',
+        \ 'format_loclist_type_E': ' ✘ {{count}}',
+        \ 'format_loclist_type_W': ' ‼ {{count}}',
+        \ 'format_loclist_type_I': ' i {{count}}',
+        \ 'format_quickfix_type_E': '✘ {{count}}',
+        \ 'format_quickfix_type_W': '‼ {{count}}',
+        \ 'format_quickfix_type_I': 'i {{count}}',
+    \ })
+    return l:msg ? 'nm:'.l:msg : ''
+    endfunction
+endif
 
 " hightlights {{{
 hi SpellBad ctermfg=red guifg=red
diff --git a/.vim/after/plugin/writing.vim b/.vim/after/plugin/writing.vim
index a016316..f84cc48 100644
--- a/.vim/after/plugin/writing.vim
+++ b/.vim/after/plugin/writing.vim
@@ -72,13 +72,15 @@ function! s:writing_mode_enter()
     set textwidth=120
     " ALEToggle
     " Grammarous keymaps
-    nmap <Leader>c :GrammarousCheck --lang=de
-    nmap <Leader>gi <Plug>(grammarous-move-to-info-window)
-    nmap <Leader>gr <Plug>(grammarous-remove-error)
-    nmap <Leader>gd <Plug>(grammarous-disable-rule)
-    nmap <Leader>gf <Plug>(grammarous-fixit)
-    nmap <Leader>gn <Plug>(grammarous-move-to-next-error)
-    nmap <Leader>gp <Plug>(grammarous-move-to-previous-error)
+    if exists('g:loaded_grammarous')
+        nmap <leader>l :GrammarousCheck --lang=de
+        nmap <leader>gi <Plug>(grammarous-move-to-info-window)
+        nmap <leader>gr <Plug>(grammarous-remove-error)
+        nmap <leader>gd <Plug>(grammarous-disable-rule)
+        nmap <leader>gf <Plug>(grammarous-fixit)
+        nmap <leader>gn <Plug>(grammarous-move-to-next-error)
+        nmap <leader>gp <Plug>(grammarous-move-to-previous-error)
+    endif
 endfunction
 
 augroup Writing
@@ -88,28 +90,3 @@ augroup Writing
     au User GoyoEnter nested call <SID>goyo_enter()
     au User GoyoLeave nested call <SID>goyo_leave()
 augroup END
-
-" LaTeX
-" let g:vimtex_view_general_viewer
-"             \ = '/Applications/Skim.app/Contents/SharedSupport/displayline'
-" let g:vimtex_view_general_options = '-r @line @pdf @tex'
-
-" " This adds a callback hook that updates Skim after compilation
-" let g:vimtex_latexmk_callback_hooks = ['UpdateSkim']
-" function! UpdateSkim(status)
-"     if !a:status | return | endif
-
-"     let l:out = b:vimtex.out()
-"     let l:tex = expand('%:p')
-"     let l:cmd = [g:vimtex_view_general_viewer, '-r']
-"     if !empty(system('pgrep Skim'))
-"         call extend(l:cmd, ['-g'])
-"     endif
-"     if has('nvim')
-"         call jobstart(l:cmd + [line('.'), l:out, l:tex])
-"     elseif has('job')
-"         call job_start(l:cmd + [line('.'), l:out, l:tex])
-"     else
-"         call system(join(l:cmd + [line('.'), shellescape(l:out), shellescape(l:tex)], ' '))
-"     endif
-" endfunction