dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.config/nvim/after/ftplugin/go.vim

37 lines
1013 B
VimL

setlocal noexpandtab
setlocal shiftwidth=4
setlocal tabstop=4
setlocal foldmethod=syntax
let g:go_autodetect_gopath = 1
let g:go_imports_autosave = 1
let g:go_doc_popup_window = 1
let g:go_gopls_enabled = 1
let g:go_fmt_command = "goimports"
let g:go_list_type = "quickfix"
" Go syntax highlighting
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_operators = 1
" Status line types/signatures
let g:go_auto_type_info = 1
" Add the failing test name to the output of :GoTest
let g:go_test_show_name = 1
let b:ale_linters = ['gopls']
inoremap <buffer> . .<C-x><C-o>
nmap <buffer><localleader>t :GoTest!<CR>
nmap <buffer><localleader>v :GoVet!<CR>
nmap <buffer><localleader>b :GoBuild!<CR>
nmap <buffer><localleader>i :GoInstall!<CR>
nmap <buffer><localleader>l :GoMetaLinter!<CR>
nmap <buffer><localleader>r :GoRun %<CR>
nmap <buffer><localleader>d :GoDebugStart!<CR>
nmap <buffer><leader>r :GoRun!<CR>