Changes changes changes

This commit is contained in:
Anthony Cicchetti 2020-07-07 21:04:44 -04:00
parent 910d2c49a3
commit 29f33d3de5
4 changed files with 31 additions and 11 deletions

View file

@ -6,3 +6,4 @@ youtube-dl
black black
poetry poetry
magic-wormhole magic-wormhole
neovim-remote

View file

@ -18,3 +18,8 @@
state: link state: link
force: yes force: yes
- name: Create undodir
file:
path: ~/.undodir
state: directory

View file

@ -44,6 +44,10 @@ endif
if has("persistent_undo") if has("persistent_undo")
set undofile set undofile
set undodir=$HOME/.undodir set undodir=$HOME/.undodir
augroup undodir
autocmd!
autocmd BufWritePre /tmp/* setlocal noundofile
augroup END
endif endif
call plug#begin('~/.config/nvim/plugged') call plug#begin('~/.config/nvim/plugged')
@ -68,6 +72,13 @@ Plug 'ctrlpvim/ctrlp.vim'
" Wakatime " Wakatime
Plug 'wakatime/vim-wakatime' Plug 'wakatime/vim-wakatime'
" Dispatch
Plug 'tpope/vim-dispatch'
Plug 'radenling/vim-dispatch-neovim'
" Editorconfig
Plug 'sgur/vim-editorconfig'
Plug 'terryma/vim-expand-region' Plug 'terryma/vim-expand-region'
Plug 'junegunn/rainbow_parentheses.vim' Plug 'junegunn/rainbow_parentheses.vim'
@ -99,6 +110,8 @@ let g:ctrlp_map = '<Leader>p'
let g:ctrlp_cmd = 'CtrlPMixed' let g:ctrlp_cmd = 'CtrlPMixed'
let g:ctrlp_user_command = 'rg --files %s' let g:ctrlp_user_command = 'rg --files %s'
set signcolumn=yes
" Builtin LSP " Builtin LSP
lua << EOF lua << EOF
local nvim_lsp = require'nvim_lsp' local nvim_lsp = require'nvim_lsp'
@ -147,19 +160,9 @@ vnoremap <Leader>P "+P
vmap v <Plug>(expand_region_expand) vmap v <Plug>(expand_region_expand)
vmap <C-v> <Plug>(expand_region_shrink) vmap <C-v> <Plug>(expand_region_shrink)
"Coc Keymaps and options
nnoremap <silent> <leader><Space>d :call CocAction('jumpDefinition')<cr>
nnoremap <silent> <leader><Space>g :call CocAction('jumpTypeDefinition')<cr>
"which-key "which-key
let g:which_key_map = {} let g:which_key_map = {}
autocmd! User vim-which-key call which_key#register('<Space>', 'g:which_key_map') autocmd! User vim-which-key call which_key#register('<Space>', 'g:which_key_map')
let g:which_key_map[' '] = {
\ 'name' : '+CoC' ,
\ 'd' : 'go-to-definition' ,
\ 'g' : 'go-to-type-definition' ,
\ }
call which_key#register('<Space>', "g:which_key_map")
nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR> nnoremap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR> nnoremap <silent> <localleader> :<c-u>WhichKey ','<CR>
@ -184,6 +187,10 @@ function! GetGitUrl()
endfunction endfunction
nnoremap <silent> <leader>c :call GetGitUrl()<CR> nnoremap <silent> <leader>c :call GetGitUrl()<CR>
nnoremap <silent> <leader>* :grep <cword><CR>:cw
set grepprg=rg\ -H\ --no-heading\ --vimgrep
set grepformat=%f:%l:%c:%m
if has("nvim-0.5.0") if has("nvim-0.5.0")
lua << EOF lua << EOF

View file

@ -50,7 +50,6 @@ else
fi fi
alias exa="exa -l --git" alias exa="exa -l --git"
alias edit='emacs'
function dt() { function dt() {
local session_name local session_name
@ -82,6 +81,14 @@ function nv() {
nvr -s $@ nvr -s $@
} }
function vim() {
if [[ $(whence -p nvim 2> /dev/null) ]]; then
nv ${@}
else
vim ${@}
fi
}
path+=($HOME/.anyenv/bin) path+=($HOME/.anyenv/bin)
eval "$(anyenv init -)" eval "$(anyenv init -)"
path+=($(yarn global bin)) path+=($(yarn global bin))