From b60d2e9b993e65412bade68e67992123235b7cbe Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Wed, 3 May 2023 12:29:49 -0700 Subject: [PATCH] Prevent errors in vim when editing go files --- go/.config/vim/ftplugin/go.vim | 3 --- go/.config/vim/snips/go.snippets | 9 ++++++--- vim-fancy/.config/vim/plug.d/vim-fancy.vim | 3 ++- vim/.config/vim/autoload/plug.vim | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/go/.config/vim/ftplugin/go.vim b/go/.config/vim/ftplugin/go.vim index 0fe93c3..0eaf908 100644 --- a/go/.config/vim/ftplugin/go.vim +++ b/go/.config/vim/ftplugin/go.vim @@ -10,9 +10,6 @@ let g:go_highlight_structs = 1 let g:go_highlight_operators = 1 let g:go_highlight_build_constraints = 1 -let g:ale_linters['go'] = ['golangci-lint'] -let g:ale_go_golangci_lint_options = '' - " Open go doc in vertical window, horizontal, or tab nnoremap d :GoDef nnoremap t :GoDefType diff --git a/go/.config/vim/snips/go.snippets b/go/.config/vim/snips/go.snippets index 2050d38..dac6f2f 100644 --- a/go/.config/vim/snips/go.snippets +++ b/go/.config/vim/snips/go.snippets @@ -1,5 +1,5 @@ snippet ignore "ignore function" ! -func(...interface{}) {}(${1}) +func(...any) {}(${1}) endsnippet snippet ctx "context" ! ctx context.Context @@ -23,17 +23,20 @@ func Test${1}(t *testing.T) { } } endsnippet -snippet htest "setup hellotech test case" ! + +snippet htest "setup context test case" ! func Test${1}(t *testing.T) { type testcase struct { Name string Setup func(tc *testcase) } + tt := []testcase{} + for _, tc := range tt { tc := tc t.Run(tc.Name, func(t *testing.T) { - ctx, a, ctrl := cutils.Test(t) + ctx, a, ctrl := utils.Test(t) t.Parallel() tc.Setup(&tc) }) diff --git a/vim-fancy/.config/vim/plug.d/vim-fancy.vim b/vim-fancy/.config/vim/plug.d/vim-fancy.vim index 6c607b6..cc29baf 100644 --- a/vim-fancy/.config/vim/plug.d/vim-fancy.vim +++ b/vim-fancy/.config/vim/plug.d/vim-fancy.vim @@ -7,7 +7,7 @@ Plug 'lifepillar/pgsql.vim', { 'for': [ 'sql' ] } let g:sql_type_default = 'pgsql' Plug 'dense-analysis/ale', { - \ 'tag': 'v3.2.0', + \ 'tag': 'v3.3.0', \ 'for': [ \ 'bash', \ 'css', @@ -22,6 +22,7 @@ Plug 'dense-analysis/ale', { \ 'markdown', \ 'php', \ 'python', + \ 'ruby', \ 'rust', \ 'scss', \ 'sh', diff --git a/vim/.config/vim/autoload/plug.vim b/vim/.config/vim/autoload/plug.vim index 652caa8..9c3011f 100644 --- a/vim/.config/vim/autoload/plug.vim +++ b/vim/.config/vim/autoload/plug.vim @@ -22,7 +22,7 @@ " Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets' " " " On-demand loading -" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } +" Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' } " Plug 'tpope/vim-fireplace', { 'for': 'clojure' } " " " Using a non-default branch