misc changes to vimrc

This commit is contained in:
Bruno Carlin 2019-05-24 09:49:46 +02:00
parent 2087e43557
commit 93c23b8798

View file

@ -50,6 +50,7 @@ call matchadd('ColorColumn', '\%81v', 100)
if has("autocmd") if has("autocmd")
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType gohtmltmpl setlocal ts=2 sts=2 sw=2 expandtab autocmd FileType gohtmltmpl setlocal ts=2 sts=2 sw=2 expandtab
@ -82,24 +83,40 @@ let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1 let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1 let g:syntastic_check_on_wq = 1
let g:syntastic_aggregate_errors = 1 let g:syntastic_aggregate_errors = 1
" let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck'] let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
" let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] } " let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
let g:syntastic_javascript_checkers = ['eslint'] let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_java_javac_config_file_enabled = 1 let g:syntastic_java_javac_config_file_enabled = 1
" Vim-go options " Vim-go options
let g:go_fmt_command = "goreturns" let g:go_fmt_command = "goimports"
let g:go_metalinter_enabled = ['vet', 'golint', 'errcheck', 'structcheck', 'deadcode', 'gocyclo', 'ineffassign', 'dupl', 'gotype', 'varcheck', 'interfacer', 'gosimple', 'staticcheck', 'misspell'] let g:go_fmt_autosave = 1
let g:go_metalinter_command = "golangci-lint"
let g:go_metalinter_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'unused', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint']
let g:go_metalinter_autosave = 1 let g:go_metalinter_autosave = 1
let g:go_metalinter_autosave_enabled = ['vet', 'golint', 'errcheck', 'structcheck', 'deadcode', 'gocyclo', 'ineffassign', 'dupl', 'gotype', 'varcheck', 'interfacer', 'gosimple', 'staticcheck', 'misspell'] "let g:go_metalinter_autosave_enabled = ['govet', 'golint', 'errcheck']
let g:go_get_update = 0 let g:go_metalinter_autosave_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'unused', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint']
let g:go_list_type = "quickfix" let g:go_list_type = "quickfix"
let g:go_highlight_functions = 1 let g:go_highlight_functions = 1
let g:go_highlight_function_parameters = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_methods = 1 let g:go_highlight_methods = 1
let g:go_highlight_fields = 1 let g:go_highlight_fields = 1
let g:go_highlight_types = 1 let g:go_highlight_types = 1
let g:go_highlight_operators = 1 let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1 let g:go_highlight_build_constraints = 1
let g:go_highlight_generate_tags = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_array_whitespace_error = 1
let g:go_highlight_chan_whitespace_error = 1
let g:go_highlight_space_tab_error = 1
let g:go_highlight_trailing_whitespace_error = 1
let g:go_highlight_variable_declarations = 1
let g:go_info_mode = 'gopls'
let g:go_test_show_name = 1
let g:go_test_timeout= '60s'
let g:go_auto_type_info = 1
let g:go_jump_to_error = 0
if has("autocmd") if has("autocmd")
autocmd FileType go nmap <leader>b <Plug>(go-build) autocmd FileType go nmap <leader>b <Plug>(go-build)
autocmd FileType go nmap <leader>r <Plug>(go-run) autocmd FileType go nmap <leader>r <Plug>(go-run)
@ -109,6 +126,8 @@ if has("autocmd")
autocmd FileType go nmap <leader>C <Plug>(go-cover-clear) autocmd FileType go nmap <leader>C <Plug>(go-cover-clear)
autocmd FileType go nmap <leader>a <Plug>(go-alternate) autocmd FileType go nmap <leader>a <Plug>(go-alternate)
autocmd FileType go nmap <leader>f <Plug>(go-fmt) autocmd FileType go nmap <leader>f <Plug>(go-fmt)
autocmd FileType go nmap <leader>d <Plug>(go-def)
autocmd FileType go nmap <leader>m <Plug>(go-metalinter)
endif endif
" vimwiki options " vimwiki options
@ -125,7 +144,7 @@ let g:vimwiki_list = [{'path': '~/Notebook/work',
let g:vimwiki_ext2syntax = {'.md': 'markdown'} let g:vimwiki_ext2syntax = {'.md': 'markdown'}
" Grammalecte options " Grammalecte options
let g:grammalecte_cli_py='/usr/bin/grammalecte-cli.py' let g:grammalecte_cli_py='/usr/bin/grammalecte'
" IndentGuide options " IndentGuide options
let g:indent_guides_auto_colors = 0 let g:indent_guides_auto_colors = 0
@ -174,3 +193,4 @@ nnoremap <leader>h :cclose<CR>
" Removes trailing whitespaces " Removes trailing whitespaces
nnoremap <leader>s :keeppattern %s/\s\+$//<CR> nnoremap <leader>s :keeppattern %s/\s\+$//<CR>
autocmd BufNewFile,BufRead *.tmpl set syntax=gohtmltmpl