Skip to content

Instantly share code, notes, and snippets.

@replsv
Last active February 26, 2020 19:10
Show Gist options
  • Save replsv/35ff68896b4ca03cf32ac20ee9d3a53f to your computer and use it in GitHub Desktop.
Save replsv/35ff68896b4ca03cf32ac20ee9d3a53f to your computer and use it in GitHub Desktop.
nvim-config
call plug#begin('~/.config/nvim/.plugged')
" operators
Plug 'tpope/vim-surround'
Plug 'christoomey/vim-sort-motion'
" textobj
Plug 'wellle/targets.vim'
" workflow
Plug 'moll/vim-bbye' " :Bwipeout
Plug 'tpope/vim-repeat'
Plug 'Shougo/defx.nvim'
Plug 'kristijanhusak/defx-icons'
Plug 'kristijanhusak/defx-git'
Plug 'tpope/vim-sleuth'
Plug 'airblade/vim-rooter'
Plug 'rhysd/clever-f.vim'
" language support
Plug 'sheerun/vim-polyglot'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'tyru/caw.vim'
Plug 'sirver/UltiSnips'
Plug 'liuchengxu/vista.vim'
Plug 'kkoomen/vim-doge'
Plug 'AndrewRadev/tagalong.vim'
Plug 'tpope/vim-endwise'
Plug 'Shougo/echodoc.vim'
Plug 'phpvim/phpcd.vim'
Plug 'tobyS/pdv'
" languge support extra
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
Plug 'mhinz/vim-crates'
Plug 'fatih/vim-go'
Plug 'mogelbrod/vim-jsonpath'
" utils
Plug 'pbrisbin/vim-mkdir'
Plug 'tpope/vim-eunuch'
Plug 'skywind3000/asyncrun.vim'
Plug 'scrooloose/nerdtree'
" tmux
Plug 'tmux-plugins/vim-tmux'
Plug 'tmux-plugins/vim-tmux-focus-events'
Plug 'christoomey/vim-tmux-navigator'
" git
Plug 'tpope/vim-fugitive'
Plug 'junegunn/gv.vim'
Plug 'rhysd/git-messenger.vim'
" status
Plug 'itchyny/vim-gitbranch'
Plug 'itchyny/lightline.vim'
" visual
Plug 'norcalli/nvim-colorizer.lua'
Plug 'machakann/vim-highlightedyank'
" themes
Plug 'drewtempelmeyer/palenight.vim'
" misc
Plug 'lbrayner/vim-rzip'
" internal
let plugins = split(system('find ~/.config/nvim/plugs/ -maxdepth 1 -type d | tail -n +2'), "\n")
for plugin in plugins
Plug plugin
endfor
call plug#end()
scriptencoding utf8
" init (minimal)
set shell=/usr/local/bin/fish
filetype plugin indent on
syntax on
set hidden
set fileencoding=utf8
set mouse=nv
" visual
set termguicolors
set visualbell
set relativenumber
set list listchars=tab:\ \ ,trail:· ",eol:¬
set title " update window title
set cmdheight=1
set wrap
set showbreak=>\
set linebreak
set breakindent
set textwidth=0
set wrapmargin=2
set colorcolumn=+1
set signcolumn=yes
set nofoldenable
" conceal
set conceallevel=2
set concealcursor=c " nc
" clipboard
set clipboard+=unnamedplus
" file operations
" set autoread
set noswapfile
"set nobackup
set nowritebackup
" history
set history=10000
set undodir=~/.vim_undo
set undolevels=10000
" style
set tabstop=4
set softtabstop=0
set shiftwidth=4
" set expandtab
set smartindent
set shiftround " round shifts to shiftwidth multiplier
set background=dark
colorscheme palenight
" edit
set backspace=indent,eol,start " allow backspace in insert mode
set shortmess+=c
" search/substitute
set ignorecase
set smartcase
set inccommand=nosplit
set gdefault " assume //g
" windows
set splitbelow
set splitright
" keyboard
set notimeout
set ttimeout
set ttimeoutlen=10
" security
set nomodeline
set secure
" performance
set lazyredraw
set synmaxcol=500
set updatetime=100 " for cursorhold
" status
" set laststatus=2
" NERDTree
let NERDTree=1
let NERDTreeShowHidden=1
"" NERDTree configuration
let g:NERDTreeChDirMode=2
let g:NERDTreeIgnore=['\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']
let g:NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
let g:NERDTreeShowBookmarks=1
let g:nerdtree_tabs_focus_on_files=1
let g:NERDTreeMapOpenInTabSilent = '<RightMouse>'
let g:NERDTreeWinSize = 50
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.db,*.sqlite
nnoremap <silent> <F2> :NERDTreeFind<CR>
noremap <F3> :NERDTreeToggle<CR>
" tabs navigation for nerdtree
map <S-l> :tabn<CR>
map <S-h> :tabp<CR>
map <S-n> :tabnew<CR>
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Git branch
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component_function': {
\ 'gitbranch': 'gitbranch#name'
\ },
\ }
" diff
set diffopt+=vertical
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment