From 52721a644596c7d2504586a6e6c0643ee32e20bc Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Thu, 15 Nov 2018 11:56:44 +0000 Subject: [PATCH] Remove syntastic --- .vimrc | 124 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 100 insertions(+), 24 deletions(-) diff --git a/.vimrc b/.vimrc index 290d043..521bd58 100644 --- a/.vimrc +++ b/.vimrc @@ -82,8 +82,9 @@ Plugin 'gmarik/vundle' Plugin 'scrooloose/nerdtree' Plugin 'scrooloose/nerdcommenter' Plugin 'tiagofumo/vim-nerdtree-syntax-highlight' -Plugin 'vim-syntastic/syntastic' +Plugin 'w0rp/ale' Plugin 'Shougo/vimproc.vim' +Plugin 'craigemery/vim-autotag' Plugin 'leafgarland/typescript-vim' Plugin 'SirVer/ultisnips' Plugin 'chr4/nginx.vim' @@ -116,7 +117,7 @@ endif Plugin 'ryanoasis/vim-devicons' " step 2: font configuration " " These are the basic settings to get the font to work (required): -set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Nerd\ Font\ Complete\ 12 +" set guifont=Droid\ Sans\ Mono\ for\ Powerline\ Nerd\ Font\ Complete\ 12 " set guifont=Fira\ Code\ Medium\ for\ Powerline\ Plus\ Nerd\ File\ Types\ Medium\ 12 set encoding=utf-8 @@ -129,16 +130,19 @@ let g:miniBufExplForceSyntaxEnable = 1 let g:airline#extensions#tabline#enabled = 1 let g:airline_powerline_fonts = 1 +let g:airline#extensions#ale#enabled = 1 + +let g:autotagTagsFile=".tags" " Syntastic config -set statusline+=%#warningmsg# -set statusline+=%{SyntasticStatuslineFlag()} -set statusline+=%* +" set statusline+=%#warningmsg# +" set statusline+=%{SyntasticStatuslineFlag()} +" set statusline+=%* -let g:syntastic_always_populate_loc_list = 1 -let g:syntastic_auto_loc_list = 1 -let g:syntastic_check_on_open = 1 -let g:syntastic_check_on_wq = 0 +"let g:syntastic_always_populate_loc_list = 1 +"let g:syntastic_auto_loc_list = 1 +"let g:syntastic_check_on_open = 1 +"let g:syntastic_check_on_wq = 0 " pymode config let g:pymode_lint_config = '$HOME/.pylint.rc' @@ -179,20 +183,6 @@ let g:ctrlp_custom_ignore = { map g :call RopeGotoDefinition() set completeopt=longest,menuone -function! OmniPopup(action) - if pumvisible() - if a:action == 'j' - return "\" - elseif a:action == 'k' - return "\" - endif - endif - return a:action -endfunction -inoremap =OmniPopup('j') -inoremap =OmniPopup('k') - -let g:OmniSharp_server_type = 'roslyn' filetype on @@ -203,7 +193,7 @@ set softtabstop=4 set shiftwidth=4 set foldcolumn=4 -set foldenable +" set foldenable set foldlevel=2 set foldmethod=syntax " Markers are used to specify folds. set foldminlines=0 " Allow folding single lines @@ -223,6 +213,92 @@ set background=dark syntax enable filetype plugin indent on +filetype plugin on + +"omnisharp settings +" OmniSharp won't work without this setting +let g:OmniSharp_server_path='/home/fergalm/working/omnisharp-roslyn/omnisharp/OmniSharp.exe' + + +" Set the type lookup function to use the preview window instead of echoing it +"let g:OmniSharp_typeLookupInPreview = 1 + +" Timeout in seconds to wait for a response from the server +let g:OmniSharp_timeout = 5 + +" Don't autoselect first omnicomplete option, show options even if there is only +" one (so the preview documentation is accessible). Remove 'preview' if you +" don't want to see any documentation whatsoever. +set completeopt=longest,menuone,preview + +" Fetch full documentation during omnicomplete requests. +" There is a performance penalty with this (especially on Mono). +" By default, only Type/Method signatures are fetched. Full documentation can +" still be fetched when you need it with the :OmniSharpDocumentation command. +"let g:omnicomplete_fetch_full_documentation = 1 + +" Set desired preview window height for viewing documentation. +" You might also want to look at the echodoc plugin. +set previewheight=5 + +" Tell ALE to use OmniSharp for linting C# files, and no other linters. +let g:ale_linters = { 'cs': ['OmniSharp'] } + +augroup omnisharp_commands + autocmd! + + " When Syntastic is available but not ALE, automatic syntax check on events + " (TextChanged requires Vim 7.4) + " autocmd BufEnter,TextChanged,InsertLeave *.cs SyntasticCheck + + " Show type information automatically when the cursor stops moving + autocmd CursorHold *.cs call OmniSharp#TypeLookupWithoutDocumentation() + + " The following commands are contextual, based on the cursor position. + autocmd FileType cs nnoremap gd :OmniSharpGotoDefinition + autocmd FileType cs nnoremap fi :OmniSharpFindImplementations + autocmd FileType cs nnoremap fs :OmniSharpFindSymbol + autocmd FileType cs nnoremap fu :OmniSharpFindUsages + + " Finds members in the current buffer + autocmd FileType cs nnoremap fm :OmniSharpFindMembers + + autocmd FileType cs nnoremap fx :OmniSharpFixUsings + autocmd FileType cs nnoremap tt :OmniSharpTypeLookup + autocmd FileType cs nnoremap dc :OmniSharpDocumentation + autocmd FileType cs nnoremap :OmniSharpSignatureHelp + autocmd FileType cs inoremap :OmniSharpSignatureHelp + + + " Navigate up and down by method/property/field + autocmd FileType cs nnoremap :OmniSharpNavigateUp + autocmd FileType cs nnoremap :OmniSharpNavigateDown +augroup END + +" Contextual code actions (uses fzf, CtrlP or unite.vim when available) +nnoremap :OmniSharpGetCodeActions +" Run code actions with text selected in visual mode to extract method +xnoremap :call OmniSharp#GetCodeActions('visual') + +" Rename with dialog +nnoremap nm :OmniSharpRename +nnoremap :OmniSharpRename +" Rename without dialog - with cursor on the symbol to rename: `:Rename newname` +command! -nargs=1 Rename :call OmniSharp#RenameTo("") + +nnoremap cf :OmniSharpCodeFormat + +" Start the omnisharp server for the current solution +nnoremap ss :OmniSharpStartServer +nnoremap sp :OmniSharpStopServer + +" Add syntax highlighting for types and interfaces +nnoremap th :OmniSharpHighlightTypes + +" Enable snippet completion +" let g:OmniSharp_want_snippet=1 +"end omnisharp settings + "pyflake settings let g:flake8_show_quickfix=0