Prevent errors in vim when editing go files
This commit is contained in:
parent
bd00a2b8b9
commit
b60d2e9b99
@ -10,9 +10,6 @@ let g:go_highlight_structs = 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:ale_linters['go'] = ['golangci-lint']
|
|
||||||
let g:ale_go_golangci_lint_options = ''
|
|
||||||
|
|
||||||
" Open go doc in vertical window, horizontal, or tab
|
" Open go doc in vertical window, horizontal, or tab
|
||||||
nnoremap <leader>d :GoDef<CR>
|
nnoremap <leader>d :GoDef<CR>
|
||||||
nnoremap <leader>t :GoDefType<CR>
|
nnoremap <leader>t :GoDefType<CR>
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
snippet ignore "ignore function" !
|
snippet ignore "ignore function" !
|
||||||
func(...interface{}) {}(${1})
|
func(...any) {}(${1})
|
||||||
endsnippet
|
endsnippet
|
||||||
snippet ctx "context" !
|
snippet ctx "context" !
|
||||||
ctx context.Context
|
ctx context.Context
|
||||||
@ -23,17 +23,20 @@ func Test${1}(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
snippet htest "setup hellotech test case" !
|
|
||||||
|
snippet htest "setup context test case" !
|
||||||
func Test${1}(t *testing.T) {
|
func Test${1}(t *testing.T) {
|
||||||
type testcase struct {
|
type testcase struct {
|
||||||
Name string
|
Name string
|
||||||
Setup func(tc *testcase)
|
Setup func(tc *testcase)
|
||||||
}
|
}
|
||||||
|
|
||||||
tt := []testcase{}
|
tt := []testcase{}
|
||||||
|
|
||||||
for _, tc := range tt {
|
for _, tc := range tt {
|
||||||
tc := tc
|
tc := tc
|
||||||
t.Run(tc.Name, func(t *testing.T) {
|
t.Run(tc.Name, func(t *testing.T) {
|
||||||
ctx, a, ctrl := cutils.Test(t)
|
ctx, a, ctrl := utils.Test(t)
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
tc.Setup(&tc)
|
tc.Setup(&tc)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Plug 'lifepillar/pgsql.vim', { 'for': [ 'sql' ] }
|
|||||||
let g:sql_type_default = 'pgsql'
|
let g:sql_type_default = 'pgsql'
|
||||||
|
|
||||||
Plug 'dense-analysis/ale', {
|
Plug 'dense-analysis/ale', {
|
||||||
\ 'tag': 'v3.2.0',
|
\ 'tag': 'v3.3.0',
|
||||||
\ 'for': [
|
\ 'for': [
|
||||||
\ 'bash',
|
\ 'bash',
|
||||||
\ 'css',
|
\ 'css',
|
||||||
@ -22,6 +22,7 @@ Plug 'dense-analysis/ale', {
|
|||||||
\ 'markdown',
|
\ 'markdown',
|
||||||
\ 'php',
|
\ 'php',
|
||||||
\ 'python',
|
\ 'python',
|
||||||
|
\ 'ruby',
|
||||||
\ 'rust',
|
\ 'rust',
|
||||||
\ 'scss',
|
\ 'scss',
|
||||||
\ 'sh',
|
\ 'sh',
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
" Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
||||||
"
|
"
|
||||||
" " On-demand loading
|
" " On-demand loading
|
||||||
" Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
" Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle' }
|
||||||
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
" Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
|
||||||
"
|
"
|
||||||
" " Using a non-default branch
|
" " Using a non-default branch
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user