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

39 lines
1.1 KiB
VimL

setlocal noexpandtab
setlocal shiftwidth=4
setlocal tabstop=4
setlocal foldmethod=syntax
let g:go_textobj_include_function_doc = 1
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_metalinter_autosave = 1
let g:go_fmt_command = "goimports"
let g:go_list_type = "quickfix"
" Go syntax highlighting
let g:go_highlight_types = 1
let g:go_highlight_build_constraints = 1
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
inoremap <buffer> . .<C-x><C-o>
nmap <buffer><leader>t :GoTest!<CR>
nmap <buffer><leader>b :GoBuild!<CR>
nmap <buffer><leader>i :GoInstall!<CR>
nmap <buffer><leader>R :GoRun %<CR>
nmap <buffer><leader>x :GoDebugStart!<CR>
nmap <buffer><leader>r :GoRun!<CR>
nmap <buffer><leader>d :GoDoc<CR>
nmap <buffer><leader>D :GoDocBrowser<CR>