~mrls/dotfiles

3a4fc254767a3b82b0fee8b42b06ece08eaff022 — Mauro Morales 1 year, 11 months ago d32d51c master
go updates
2 files changed, 47 insertions(+), 9 deletions(-)

M .config/git/config
M .config/nvim/init.vim
M .config/git/config => .config/git/config +8 -5
@@ 5,12 5,15 @@
	editor = nvim
[branch]
	sort = -committerdate
# define command which will be used when "nvim" is set as a merge tool
[mergetool "nvim"]
  cmd = nvim -f -c \"Gdiffsplit!\" \"$MERGED\"
# set "nvim" as tool for merging
[merge]
	tool = fugitive
[mergetool "vimdiff"]
  # cmd = nvim -d $LOCAL $BASE $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[mergetool "fugitive"]
  cmd = nvim +Gdiff $MERGED
  tool = nvim
# automatically launch merge tool without displaying a prompt
[mergetool]
  prompt = false
[diff]
  tool = fugitive
[alias]

M .config/nvim/init.vim => .config/nvim/init.vim +39 -4
@@ 6,7 6,7 @@ Plug 'nanotech/jellybeans.vim'
Plug 'olivertaylor/vacme'
" IDE like functionality
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/deoplete.nvim'
Plug 'majutsushi/tagbar'
Plug 'tpope/vim-fugitive'
Plug 'itchyny/lightline.vim'


@@ 42,7 42,7 @@ Plug 'thoughtbot/vim-rspec', { 'for': 'ruby' }
Plug 'danchoi/ri.vim'
" Go plugins 
Plug 'fatih/vim-go'
Plug 'zchee/deoplete-go', { 'do': ':make' }
Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'}
" JS plugins
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
" Misc plugins


@@ 91,7 91,7 @@ set linebreak
set colorcolumn=+1
set diffopt+=vertical
set cursorline
set clipboard=unnamedplus
set clipboard+=unnamedplus

" highlight DiffAdd    cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red
" highlight DiffDelete cterm=bold ctermfg=10 ctermbg=17 gui=none guifg=bg guibg=Red


@@ 106,6 106,9 @@ nnoremap <leader>cfp :let @* = expand("%")<cr>
nnoremap <leader>of :Files<cr>
nnoremap <leader>ogf :GFiles<cr>


nnoremap <leader>esc <C-w><C-v><C-l>:e ~/.config/sway/config<cr>

let g:neosnippet#snippets_directory='~/.config/nvim/plugged/neosnippet-snippets'
let g:deoplete#enable_at_startup = 1
imap <C-k>     <Plug>(neosnippet_expand_or_jump)


@@ 229,8 232,40 @@ map <Leader>ra :call RunAllSpecs()<CR>

" Golang Config
autocmd BufNewFile,BufRead *.go setlocal noexpandtab tabstop=4 shiftwidth=4
let g:go_fmt_command = "goimports"
let g:go_imports_autosave = 1
let g:go_fmt_autosave = 1
let g:go_fmt_command = "gofmt"
let g:go_fmt_options = {
    \ 'gofmt': '-s',
    \ }
let g:go_fmt_fail_silently = 1
let g:tagbar_type_go = {
	\ 'ctagstype' : 'go',
	\ 'kinds'     : [
		\ 'p:package',
		\ 'i:imports:1',
		\ 'c:constants',
		\ 'v:variables',
		\ 't:types',
		\ 'n:interfaces',
		\ 'w:fields',
		\ 'e:embedded',
		\ 'm:methods',
		\ 'r:constructor',
		\ 'f:functions'
	\ ],
	\ 'sro' : '.',
	\ 'kind2scope' : {
		\ 't' : 'ctype',
		\ 'n' : 'ntype'
	\ },
	\ 'scope2kind' : {
		\ 'ctype' : 't',
		\ 'ntype' : 'n'
	\ },
	\ 'ctagsbin'  : 'gotags',
	\ 'ctagsargs' : '-sort -silent'
\ }

autocmd FileType go nmap <leader>r  <Plug>(go-run)
autocmd FileType go nmap <leader>t  <Plug>(go-test)