update vim conf (esp. coc, ale and minisnip)
This commit is contained in:
parent
bbd0c7e8c0
commit
af4dd514bd
5 changed files with 32 additions and 3 deletions
9
vim/.vim/coc-settings.json
Normal file
9
vim/.vim/coc-settings.json
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"languageserver": {
|
||||||
|
"golang": {
|
||||||
|
"command": "gopls",
|
||||||
|
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
|
||||||
|
"filetypes": ["go"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
3
vim/.vim/minisnip/_go_convey
Normal file
3
vim/.vim/minisnip/_go_convey
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Convey("{{++}}", func() {
|
||||||
|
{{++}}
|
||||||
|
})
|
1
vim/.vim/minisnip/_go_soeq
Normal file
1
vim/.vim/minisnip/_go_soeq
Normal file
|
@ -0,0 +1 @@
|
||||||
|
So({{++}}, ShouldEqual, {{++}})
|
1
vim/.vim/minisnip/_go_sonil
Normal file
1
vim/.vim/minisnip/_go_sonil
Normal file
|
@ -0,0 +1 @@
|
||||||
|
So({{++}}, ShouldBeNil)
|
21
vim/.vimrc
21
vim/.vimrc
|
@ -138,7 +138,17 @@ autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=black
|
||||||
|
|
||||||
" ALE options
|
" ALE options
|
||||||
let g:ale_completion_enabled = 0
|
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_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 = '<C-w>'
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
|
|
||||||
|
@ -151,7 +161,7 @@ call plug#begin('~/.vim/plugged')
|
||||||
Plug 'airblade/vim-gitgutter'
|
Plug 'airblade/vim-gitgutter'
|
||||||
Plug 'tpope/vim-fugitive'
|
Plug 'tpope/vim-fugitive'
|
||||||
Plug 'jreybert/vimagit'
|
Plug 'jreybert/vimagit'
|
||||||
|
|
||||||
Plug 'fatih/vim-go'
|
Plug 'fatih/vim-go'
|
||||||
Plug 'joukevandermaas/vim-ember-hbs'
|
Plug 'joukevandermaas/vim-ember-hbs'
|
||||||
Plug 'dag/vim-fish'
|
Plug 'dag/vim-fish'
|
||||||
|
@ -160,9 +170,13 @@ call plug#begin('~/.vim/plugged')
|
||||||
Plug 'ollykel/v-vim'
|
Plug 'ollykel/v-vim'
|
||||||
|
|
||||||
Plug 'liuchengxu/vim-clap'
|
Plug 'liuchengxu/vim-clap'
|
||||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
||||||
Plug 'dense-analysis/ale'
|
Plug 'dense-analysis/ale'
|
||||||
Plug 'joereynolds/vim-minisnip'
|
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 'aklt/plantuml-syntax'
|
||||||
Plug 'scrooloose/vim-slumlord'
|
Plug 'scrooloose/vim-slumlord'
|
||||||
|
@ -206,8 +220,9 @@ endfunction
|
||||||
|
|
||||||
nmap <C-p> :Clap files<CR>
|
nmap <C-p> :Clap files<CR>
|
||||||
nmap <C-p>b :Clap buffers<CR>
|
nmap <C-p>b :Clap buffers<CR>
|
||||||
|
nmap <C-p>r :Clap grep<CR>
|
||||||
|
|
||||||
imap <C-w> <Plug>(minisnip)
|
nmap <leader>MM :tabnew \| MagitOnly<CR>
|
||||||
|
|
||||||
if has("autocmd")
|
if has("autocmd")
|
||||||
autocmd FileType go nmap <leader>b <Plug>(go-build)
|
autocmd FileType go nmap <leader>b <Plug>(go-build)
|
||||||
|
|
Loading…
Add table
Reference in a new issue