refresh linux

This commit is contained in:
Diego Fernando Carrión 2021-08-30 09:04:09 +02:00
parent 4f61cff440
commit 2c41144deb
3 changed files with 89 additions and 13 deletions

View File

@ -59,6 +59,13 @@ if [[ -s "$HOME/.gvm/scripts/gvm" ]]; then
source "$HOME/.gvm/scripts/gvm"
fi
if [[ -d "$HOME/.fnm" ]]
then
export PATH=$HOME/.fnm:$PATH
eval "`fnm env`"
eval "`fnm completions --shell bash`"
fi
if [[ "$OSTYPE" == "linux-gnu"* && -f /etc/debian_version ]]
then
# if [ -d $HOME/.pyenv ]

View File

@ -1,9 +1,26 @@
{
"suggest.noselect": false,
"diagnostic.errorSign": "✘",
"diagnostic.warningSign": "!",
"diagnostic.infoSign": "?",
"diagnostic.checkCurrentLine": true,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"html",
"json",
"css",
"scss",
"go"
],
"coc.preferences.hoverTarget": "float",
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
"rootPatterns": ["go.mod"],
"filetypes": ["go"]
}
},
"go.goplsOptions": {
"staticcheck": true
}
}

View File

@ -9,9 +9,9 @@ Plug 'vim-airline/vim-airline-themes'
" Plug 'majutsushi/tagbar' " install exuberant-ctags
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'SirVer/ultisnips'
Plug 'neomake/neomake'
"Plug 'godlygeek/tabular'
" Plug 'SirVer/ultisnips'
" Plug 'neomake/neomake'
" Plug 'godlygeek/tabular'
Plug 'lepture/vim-jinja'
Plug 'b4b4r07/vim-hcl'
Plug 'hashivim/vim-packer'
@ -105,11 +105,38 @@ if has('nvim')
" Resume latest coc list
nnoremap <silent> <space>p :<C-u>CocListResume<CR>n
" disable vim-go :GoDef short cut (gd)
" this is handled by LanguageClient [LC]
let g:go_def_mapping_enabled = 0
"""" Snippets
""" Coc Snippets
" " Use <C-l> for trigger snippet expand.
" imap <C-l> <Plug>(coc-snippets-expand)
" " Use <C-j> for select text for visual placeholder of snippet.
" vmap <C-j> <Plug>(coc-snippets-select)
" " Use <C-j> for jump to next placeholder, it's default of coc.nvim
" let g:coc_snippet_next = '<c-j>'
" " Use <C-k> for jump to previous placeholder, it's default of coc.nvim
" let g:coc_snippet_prev = '<c-k>'
" " Use <C-j> for both expand and jump (make expand higher priority.)
" imap <C-j> <Plug>(coc-snippets-expand-jump)
" " Use <leader>x for convert visual selected code to snippet
" xmap <leader>x <Plug>(coc-convert-snippet)
inoremap <silent><expr> <TAB>
\ pumvisible() ? coc#_select_confirm() :
\ coc#expandableOrJumpable() ? "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
let g:coc_snippet_next = '<tab>'
endif
@ -162,17 +189,42 @@ autocmd BufNewFile,BufRead *.j2 set filetype=jinja
""" vim-go
let g:go_highlight_types = 1
let g:go_term_enabled = 1
" disable all linters as that is taken care of by coc.nvim
let g:go_diagnostics_enabled = 0
let g:go_metalinter_enabled = []
" don't jump to errors after metalinter is invoked
let g:go_jump_to_error = 0
" run go imports on file save
let g:go_fmt_command = "goimports"
let g:go_def_mode='gopls'
let g:go_info_mode='gopls'
" automatically highlight variable your cursor is on
let g:go_auto_sameids = 0
let g:go_highlight_types = 1
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_operators = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_generate_tags = 1
" let g:go_def_mode='gopls'
" let g:go_info_mode='gopls'
let g:go_term_enabled = 1
" disable vim-go :GoDef short cut (gd)
" this is handled by LanguageClient [LC]
let g:go_def_mapping_enabled = 0
""" neomake
" Full config: when writing or reading a buffer, and on changes in insert and
" normal mode (after 1s; no delay when writing).
call neomake#configure#automake('nrwi', 500)
" call neomake#configure#automake('nrwi', 500)
""" airline