diff --git a/vim/.vim/coc-settings.json b/vim/.vim/coc-settings.json new file mode 100644 index 0000000..cbac8e1 --- /dev/null +++ b/vim/.vim/coc-settings.json @@ -0,0 +1,9 @@ +{ + "languageserver": { + "golang": { + "command": "gopls", + "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"], + "filetypes": ["go"] + } + } +} diff --git a/vim/.vim/minisnip/_go_convey b/vim/.vim/minisnip/_go_convey new file mode 100644 index 0000000..79019a0 --- /dev/null +++ b/vim/.vim/minisnip/_go_convey @@ -0,0 +1,3 @@ +Convey("{{++}}", func() { + {{++}} +}) diff --git a/vim/.vim/minisnip/_go_soeq b/vim/.vim/minisnip/_go_soeq new file mode 100644 index 0000000..b69c3f7 --- /dev/null +++ b/vim/.vim/minisnip/_go_soeq @@ -0,0 +1 @@ +So({{++}}, ShouldEqual, {{++}}) diff --git a/vim/.vim/minisnip/_go_sonil b/vim/.vim/minisnip/_go_sonil new file mode 100644 index 0000000..c48482d --- /dev/null +++ b/vim/.vim/minisnip/_go_sonil @@ -0,0 +1 @@ +So({{++}}, ShouldBeNil) diff --git a/vim/.vimrc b/vim/.vimrc index 87a190f..2f26a34 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -138,7 +138,17 @@ autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=black " ALE options let g:ale_completion_enabled = 0 +let g:ale_linters = { +\ 'go': ['gofmt', 'golint', 'golangci-lint'] +\} +let g:ale_go_golangci_lint_options = '--enable-all --disable unused' let g:ale_fix_on_save = 0 +let g:ale_sign_error = '🔴' +let g:ale_sign_info = '🔵' +let g:ale_sign_warning = '🟡' + +" Minisnip options +let g:minisnip_trigger = '' call plug#begin('~/.vim/plugged') @@ -151,7 +161,7 @@ call plug#begin('~/.vim/plugged') Plug 'airblade/vim-gitgutter' Plug 'tpope/vim-fugitive' Plug 'jreybert/vimagit' - + Plug 'fatih/vim-go' Plug 'joukevandermaas/vim-ember-hbs' Plug 'dag/vim-fish' @@ -160,9 +170,13 @@ call plug#begin('~/.vim/plugged') Plug 'ollykel/v-vim' Plug 'liuchengxu/vim-clap' - Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'dense-analysis/ale' Plug 'joereynolds/vim-minisnip' + Plug 'neoclide/coc.nvim', {'branch': 'release', 'do': 'yarn install --frozen-lockfile'} + Plug 'nullvoxpopuli/coc-ember', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'} + Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile'} Plug 'aklt/plantuml-syntax' Plug 'scrooloose/vim-slumlord' @@ -206,8 +220,9 @@ endfunction nmap :Clap files nmap b :Clap buffers +nmap r :Clap grep -imap (minisnip) +nmap MM :tabnew \| MagitOnly if has("autocmd") autocmd FileType go nmap b (go-build)