Initial commit
commit
8eeaaffa63
@ -0,0 +1,3 @@
|
||||
{
|
||||
"coc.preferences.formatOnSaveFiletypes": ["css", "markdown", "javascript", "typescript", "typescriptreact", "go"]
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
|
||||
let mapleader = " "
|
||||
|
||||
vnoremap J :m '>+1<CR>gv=gv
|
||||
vnoremap K :m '<-2<CR>gv=gv
|
||||
|
||||
nnoremap / /\v
|
||||
vnoremap / /\v
|
||||
nnoremap <leader>` :noh<cr>
|
||||
nnoremap <tab> %
|
||||
vnoremap <tab> %
|
||||
|
||||
" No Cheating
|
||||
nnoremap <up> <nop>
|
||||
nnoremap <down> <nop>
|
||||
nnoremap <left> <nop>
|
||||
nnoremap <right> <nop>
|
||||
inoremap <up> <nop>
|
||||
inoremap <down> <nop>
|
||||
inoremap <left> <nop>
|
||||
inoremap <right> <nop>
|
||||
|
||||
" No weird line jumps
|
||||
nnoremap j gj
|
||||
nnoremap k gk
|
||||
|
||||
" FZF Bindings
|
||||
nnoremap <C-F> :Files<CR>
|
||||
noremap <leader><leader> :GFiles<CR>
|
||||
nnoremap <leader>C :Colors<CR>
|
||||
nnoremap <leader><CR> :Buffers<CR>
|
||||
nnoremap <leader>fl :Lines<CR>
|
||||
nnoremap <leader>m :History<CR>
|
||||
|
||||
inoremap <F1> <ESC>
|
||||
nnoremap <F1> <ESC>
|
||||
vnoremap <F1> <ESC>
|
||||
|
||||
inoremap hh <ESC>
|
||||
|
||||
" - Avoid using standard Vim directory names like 'plugin'
|
||||
call plug#begin()
|
||||
|
||||
Plug 'gruvbox-community/gruvbox'
|
||||
Plug 'tpope/vim-repeat'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'leafgarland/typescript-vim'
|
||||
Plug 'airblade/vim-gitgutter'
|
||||
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
||||
|
||||
" Initialize plugin system
|
||||
call plug#end()
|
||||
|
||||
syntax on
|
||||
let g:gruvbox_contrast_dark = 'hard'
|
||||
let g:gruvbox_italic=1
|
||||
let g:gruvbox_invert_selection='0'
|
||||
set termguicolors
|
||||
set background=dark
|
||||
|
||||
augroup RAH_CODES
|
||||
autocmd!
|
||||
autocmd vimenter * ++nested colorscheme gruvbox
|
||||
augroup END
|
||||
|
||||
"let g:netrw_banner = 0
|
||||
"let g:netrw_liststyle = 3
|
||||
"let g:netrw_browse_split = 4
|
||||
"let g:netrw_altv = 1
|
||||
"let g:netrw_winsize = 25
|
||||
"augroup ProjectDrawer
|
||||
" autocmd!
|
||||
" autocmd VimEnter * :Vexplore
|
||||
"augroup END
|
||||
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline#extensions#tabline#enabled = 1
|
||||
|
||||
" Completion
|
||||
set completeopt=menuone,noinsert,noselect
|
||||
let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
|
||||
|
||||
" Git Fugitive
|
||||
nmap <leader>gs :G<CR>
|
||||
nmap <leader>gh :diffget //3<CR>
|
||||
nmap <leader>gu :diffget //2<CR>
|
@ -0,0 +1,88 @@
|
||||
" Use tab for trigger completion with characters ahead and navigate.
|
||||
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
|
||||
" other plugin before putting this into your config.
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
" Use <c-space> to trigger completion.
|
||||
if has('nvim')
|
||||
inoremap <silent><expr> <c-space> coc#refresh()
|
||||
else
|
||||
inoremap <silent><expr> <c-@> coc#refresh()
|
||||
endif
|
||||
|
||||
" Make <CR> auto-select the first completion item and notify coc.nvim to
|
||||
" format on enter, <cr> could be remapped by other vim plugin
|
||||
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
|
||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
||||
|
||||
" Use `[g` and `]g` to navigate diagnostics
|
||||
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
|
||||
nmap <silent> [g <Plug>(coc-diagnostic-prev)
|
||||
nmap <silent> ]g <Plug>(coc-diagnostic-next)
|
||||
|
||||
" GoTo code navigation.
|
||||
nmap <silent> gd <Plug>(coc-definition)
|
||||
nmap <silent> gy <Plug>(coc-type-definition)
|
||||
nmap <silent> gi <Plug>(coc-implementation)
|
||||
nmap <silent> gr <Plug>(coc-references)
|
||||
|
||||
" Use K to show documentation in preview window.
|
||||
nnoremap <silent> K :call <SID>show_documentation()<CR>
|
||||
|
||||
function! s:show_documentation()
|
||||
if (index(['vim','help'], &filetype) >= 0)
|
||||
execute 'h '.expand('<cword>')
|
||||
elseif (coc#rpc#ready())
|
||||
call CocActionAsync('doHover')
|
||||
else
|
||||
execute '!' . &keywordprg . " " . expand('<cword>')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Highlight the symbol and its references when holding the cursor.
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
" Symbol renaming.
|
||||
nmap <leader>rn <Plug>(coc-rename)
|
||||
|
||||
" Formatting selected code.
|
||||
xmap <leader>f <Plug>(coc-format-selected)
|
||||
nmap <leader>f <Plug>(coc-format-selected)
|
||||
|
||||
augroup mygroup
|
||||
autocmd!
|
||||
" Setup formatexpr specified filetype(s).
|
||||
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
|
||||
" Update signature help on jump placeholder.
|
||||
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
|
||||
augroup end
|
||||
|
||||
" Applying codeAction to the selected region.
|
||||
" Example: `<leader>aap` for current paragraph
|
||||
xmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
nmap <leader>a <Plug>(coc-codeaction-selected)
|
||||
|
||||
" Remap keys for applying codeAction to the current buffer.
|
||||
nmap <leader>ac <Plug>(coc-codeaction)
|
||||
" Apply AutoFix to problem on the current line.
|
||||
nmap <leader>qf <Plug>(coc-fix-current)
|
||||
|
||||
command! -nargs=0 Prettier :CocCommand prettier.formatFile
|
||||
|
||||
" Add `:Format` command to format current buffer.
|
||||
command! -nargs=0 Format :call CocAction('format')
|
||||
|
||||
" Add `:Fold` command to fold current buffer.
|
||||
command! -nargs=? Fold :call CocAction('fold', <f-args>)
|
||||
|
||||
" Add `:OR` command for organize imports of the current buffer.
|
||||
command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
|
@ -0,0 +1,58 @@
|
||||
|
||||
set rtp+=/usr/local/opt/fzf
|
||||
set background=dark
|
||||
set nowrap
|
||||
set textwidth=79
|
||||
set formatoptions=qrn1
|
||||
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set gdefault
|
||||
|
||||
set incsearch
|
||||
set showmatch
|
||||
set hlsearch
|
||||
set nocompatible
|
||||
set exrc
|
||||
|
||||
set modelines=0
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set expandtab
|
||||
|
||||
set encoding=utf-8
|
||||
set scrolloff=8
|
||||
set autoindent
|
||||
set smartindent
|
||||
set showmode
|
||||
set showcmd
|
||||
set cmdheight=2
|
||||
set hidden
|
||||
set wildmenu
|
||||
set wildmode=list:longest
|
||||
set visualbell
|
||||
set cursorline
|
||||
set ttyfast
|
||||
set ruler
|
||||
set backspace=indent,eol,start
|
||||
set laststatus=2
|
||||
set relativenumber
|
||||
set nu
|
||||
set noswapfile
|
||||
set nobackup
|
||||
set nowritebackup
|
||||
set undodir=~/.config/nvim/undodir
|
||||
set undofile
|
||||
set signcolumn=yes
|
||||
set colorcolumn=80
|
||||
|
||||
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
||||
" delays and poor user experience.
|
||||
set updatetime=300
|
||||
|
||||
" Don't pass messages to |ins-completion-menu|.
|
||||
set shortmess+=c
|
||||
|
||||
set grepprg=rg\ --vimgrep\ --smart-case\ --follow
|
||||
|
@ -0,0 +1,16 @@
|
||||
source "$HOME/.antigen/antigen.zsh"
|
||||
|
||||
antigen use oh-my-zsh
|
||||
antigen bundle arialdomartini/oh-my-git
|
||||
antigen theme arialdomartini/oh-my-git-themes oppa-lana-style
|
||||
|
||||
antigen apply
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
|
||||
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
|
||||
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
alias config='/usr/bin/git --git-dir=/Users/rporter/.cfg/ --work-tree=/Users/rporter'
|
Loading…
Reference in New Issue