diff options
| author | Robert Günzler <r@gnzler.io> | 2020-12-07 19:15:23 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-01-21 19:39:11 +0100 |
| commit | 04db98668639cb0b431d50e5963f6b156d728078 (patch) | |
| tree | 4bec29af1c9c34852e974be06301f74de4802199 /.vim/after/plugin/neomake.vim | |
| parent | 9b8005439ac351ded8f6286aefa2378d25d7add5 (diff) | |
vim: big update; move lots of things to lua
Diffstat (limited to '.vim/after/plugin/neomake.vim')
| -rw-r--r-- | .vim/after/plugin/neomake.vim | 50 |
1 files changed, 32 insertions, 18 deletions
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 |