From 278a0bbbc1e141bab8bc9aa798e2f4a5bfc6efbb Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Thu, 11 Jan 2018 00:45:57 +0100 Subject: Experimental neovim alternatives included --- vimrc-full | 123 +++++++++++++++++++++++++++++++++++-------------------------- 1 file changed, 70 insertions(+), 53 deletions(-) diff --git a/vimrc-full b/vimrc-full index 4833a6a..6ff6d33 100644 --- a/vimrc-full +++ b/vimrc-full @@ -845,62 +845,76 @@ if has("python") " let g:UltiSnipsExpandTrigger="" " let g:UltiSnipsListSnippets="" - " YouCompleteMe: ===================================================================================================== - " Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... - Plug 'Valloric/YouCompleteMe' - let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar/sign column - let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar/sign coloumn - - let g:ycm_autoclose_preview_window_after_insertion = 0 - let g:ycm_auto_trigger = 1 - let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file - let g:ycm_confirm_extra_conf = 0 " security is overrated ;) - - let g:ycm_key_list_previous_completion = ['Up'] - let g:ycm_key_list_select_completion = ['Down'] - - " Plug 'vim-scripts/dbext.vim' " dependency to allow db related completions - " let g:ycm_server_python_interpreter = 'python3' - " let g:ycm_python_binary_path = '/usr/bin/python3' " the python interpreter of choice (for code checking) - " let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window - " let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword - " let g:ycm_complete_in_comments = 1 " Completion in comments - " let g:ycm_complete_in_strings = 1 " Completion in string - " let g:ycm_min_num_of_chars_for_completion = 6 " we normally avoid identifier based completion, it just helps with long words. Use semantic completions with instead (terrible idea, html snippets not working!) - " let g:ycm_min_num_identifier_candidate_chars = 4 - " let g:ycm_max_num_identifier_candidates = 10 - " let g:ycm_max_num_candidates = 50 - " let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure - " let g:ycm_key_list_select_completion = [''] - " let g:ycm_key_list_previous_completion = [''] - " let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' - " let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } - " " let g:ycm_disable_for_files_larger_than_kb = 16384 " we have faaast computers, don't we? - " let g:ycm_show_diagnostics_ui = 0 - " " disable -key for YCM so that it can be used with ultisnips - " let g:ycm_key_list_select_completion=[] - " let g:ycm_key_list_previous_completion=[] + if has('nvim') + Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + Plug 'tweekmonster/deoplete-clang2' + " Use deoplete. + let g:deoplete#enable_at_startup = 1 + else + + " YouCompleteMe: ===================================================================================================== + " Plug 'Valloric/MatchTagAlways' " highlights the closing tag/brace/... + Plug 'Valloric/YouCompleteMe' + let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar/sign column + let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar/sign coloumn + + let g:ycm_autoclose_preview_window_after_insertion = 0 + let g:ycm_auto_trigger = 1 + let g:ycm_collect_identifiers_from_tags_files = 1 " Let YCM read tags from Ctags file + let g:ycm_confirm_extra_conf = 0 " security is overrated ;) + + let g:ycm_key_list_previous_completion = ['Up'] + let g:ycm_key_list_select_completion = ['Down'] + + " Plug 'vim-scripts/dbext.vim' " dependency to allow db related completions + " let g:ycm_server_python_interpreter = 'python3' + " let g:ycm_python_binary_path = '/usr/bin/python3' " the python interpreter of choice (for code checking) + " let g:ycm_add_preview_to_completeopt = 1 " reuse existing preview window + " let g:ycm_seed_identifiers_with_syntax = 1 " Completion for programming language's keyword + " let g:ycm_complete_in_comments = 1 " Completion in comments + " let g:ycm_complete_in_strings = 1 " Completion in string + " let g:ycm_min_num_of_chars_for_completion = 6 " we normally avoid identifier based completion, it just helps with long words. Use semantic completions with instead (terrible idea, html snippets not working!) + " let g:ycm_min_num_identifier_candidate_chars = 4 + " let g:ycm_max_num_identifier_candidates = 10 + " let g:ycm_max_num_candidates = 50 + " let g:ycm_use_ultisnips_completer = 1 " Default 1, just ensure + " let g:ycm_key_list_select_completion = [''] + " let g:ycm_key_list_previous_completion = [''] + " let g:ycm_global_ycm_extra_conf = '.ycm_extra_conf.py' + " let g:ycm_semantic_triggers = { 'c': [ 're!.' ] } + " " let g:ycm_disable_for_files_larger_than_kb = 16384 " we have faaast computers, don't we? + " let g:ycm_show_diagnostics_ui = 0 + " " disable -key for YCM so that it can be used with ultisnips + " let g:ycm_key_list_select_completion=[] + " let g:ycm_key_list_previous_completion=[] + endif " SYNTASTIC: ========================================================================================================= - Plug 'scrooloose/syntastic' - set statusline+=%#warningmsg# - set statusline+=%{SyntasticStatuslineFlag()} - let g:LatexBox_latexmk_preview_continuously = 1 - let g:LatexBox_viewer = "evince" - let g:syntastic_always_populate_loc_list = 1 - let g:syntastic_auto_loc_list = 0 - let g:syntastic_check_on_open = 1 - let g:syntastic_check_on_wq = 0 - " let g:syntastic_quiet_messages = {"type":"style"} - " - " E221: multiple spaces before Operator - let g:syntastic_python_flake8_args = '--max-complexity=10 --max-line-length=120 --exclude venv --doctests --exit-zero --ignore=E221' - " filter ( = do not display) style/formatting errors and warnings - let g:syntastic_error_symbol = '✖' - let g:syntastic_style_error_symbol = '✗' - let g:syntastic_warning_symbol = '➔' - let g:syntastic_style_warning_symbol = '≈' + if has('nvim') + Plug 'w0rp/ale' + else + + + Plug 'scrooloose/syntastic' + set statusline+=%#warningmsg# + set statusline+=%{SyntasticStatuslineFlag()} + let g:LatexBox_latexmk_preview_continuously = 1 + let g:LatexBox_viewer = "evince" + let g:syntastic_always_populate_loc_list = 1 + let g:syntastic_auto_loc_list = 0 + let g:syntastic_check_on_open = 1 + let g:syntastic_check_on_wq = 0 + " let g:syntastic_quiet_messages = {"type":"style"} + " + " E221: multiple spaces before Operator + let g:syntastic_python_flake8_args = '--max-complexity=10 --max-line-length=120 --exclude venv --doctests --exit-zero --ignore=E221' + " filter ( = do not display) style/formatting errors and warnings + let g:syntastic_error_symbol = '✖' + let g:syntastic_style_error_symbol = '✗' + let g:syntastic_warning_symbol = '➔' + let g:syntastic_style_warning_symbol = '≈' + endif " JEDI: ============================================================================================================== Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures @@ -1014,6 +1028,9 @@ function! ExtendColorTheme() autocmd InsertEnter * set list autocmd InsertLeave * set nolist + " highlight double words (its unlikely they are right) + autocmd InsertLeave * syntax match Convention /\v<(\w+)\_s+\1>/ containedin=ALL + " Show trailing whitepace and spaces before a tab as part of the syntax highlighting highlight! link Convention Error autocmd BufEnter,InsertLeave * syntax match Convention /\s\+$\| \+\ze\t/ containedin=ALL -- cgit v1.2.3