From d72a8c9fa20d87989542c1e708e7d5544cc73f89 Mon Sep 17 00:00:00 2001 From: David Todd Date: Mon, 11 Jan 2021 12:23:10 -0600 Subject: [PATCH] Add golang vim config --- home/shell/vimrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/home/shell/vimrc b/home/shell/vimrc index 8e62a5e..326a256 100644 --- a/home/shell/vimrc +++ b/home/shell/vimrc @@ -38,5 +38,20 @@ set clipboard=unnamedplus " Tabs are 4 spaces wide set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab +" Golang Specific stuff +" 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 + +" Auto formatting and importing +let g:go_fmt_autosave = 1 +let g:go_fmt_command = "goimports" + +" Status line types/signatures +let g:go_auto_type_info = 1 + execute pathogen#infect() filetype plugin indent on