Skip to content

Instantly share code, notes, and snippets.

@lawrenceching
Created September 6, 2021 01:02
Show Gist options
  • Save lawrenceching/99845855b1edc5dad2d9177797805b78 to your computer and use it in GitHub Desktop.
Save lawrenceching/99845855b1edc5dad2d9177797805b78 to your computer and use it in GitHub Desktop.
The config file for neovim
syntax on
set nu
set tabstop=4
set shiftwidth=4
set expandtab
set incsearch " Enable incremental search
set hlsearch " Enable highlight search
set splitbelow " Always split below
set mouse=a " Enable mouse drag on window splits
autocmd FileType java setlocal omnifunc=javacomplete#Complete
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-default branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'scrooloose/nerdtree'
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
Plug 'ludovicchabant/vim-gutentags'
Plug 'dense-analysis/ale'
Plug 'jiangmiao/auto-pairs'
Plug 'dyng/ctrlsf.vim'
Plug 'preservim/tagbar'
Plug 'artur-shaik/vim-javacomplete2'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
let g:deoplete#enable_at_startup = 1
Plug 'wincent/command-t'
" Unmanaged plugin (manually installed and updated)
" Plug '~/my-prototype-plugin'
" Initialize plugin system
call plug#end()
colorscheme material
" For Neovim 0.1.3 and 0.1.4 - https://github.com/neovim/neovim/pull/2198
if (has('nvim'))
let $NVIM_TUI_ENABLE_TRUE_COLOR = 1
endif
" For Neovim > 0.1.5 and Vim > patch 7.4.1799 - https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162
" Based on Vim patch 7.4.1770 (`guicolors` option) - https://github.com/vim/vim/commit/8a633e3427b47286869aa4b96f2bfc1fe65b25cd
" https://github.com/neovim/neovim/wiki/Following-HEAD#20160511
if (has('termguicolors'))
set termguicolors
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment