Last active
April 13, 2020 05:30
-
-
Save fswalker/ea716f57ac11312822139a36146c487a to your computer and use it in GitHub Desktop.
NeoVim config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Basic config | |
set autoread " Automatically reload modified buffer | |
set autowriteall " Automatically write files when some commands occur | |
set backupcopy=yes " Fix Hot Module Reloading for parcel js | |
set colorcolumn=80 " Colour column 80 | |
set cursorcolumn " Highlight the column currently under cursor | |
set cursorline " Highlight the line currently under cursor | |
set expandtab " Use spaces instead of tabs | |
set foldlevel=20 " Folds with a higher level will be closed | |
set foldmethod=indent | |
set nofoldenable " All folds opened by default | |
set hidden " Hide buffer when abandoned | |
set ignorecase " Case insensitive search | |
set list " Show trailing white characters | |
set noshowmode " Hide legacy status bar at the bottom | |
set number | |
set relativenumber | |
set scrolloff=3 " The number of lines to keep above and below the cursor | |
set shiftwidth=2 " Indent by 4 spaces when auto-indenting | |
set smartcase " Search case sensitive when using capital letters | |
set tabstop=2 " Show existing tab with 4 spaces width | |
set termguicolors " 24-bit RGB color | |
set undofile " Saves undo history to a file | |
" Plugins will be downloaded under the specified directory. | |
call plug#begin('~/.config/nvim/plugged') | |
" Declare the list of plugins. | |
Plug 'tpope/vim-fugitive' | |
Plug 'itchyny/lightline.vim' | |
Plug 'junegunn/fzf' | |
Plug 'junegunn/fzf.vim' | |
" Colorschemes | |
" Emacs & Vim | |
Plug 'rakr/vim-one' "Dark Soft | |
Plug 'junegunn/seoul256.vim' "D High | |
Plug 'gosukiwi/vim-atom-dark' "DH | |
Plug 'morhetz/gruvbox' "Warm S | |
" Vim only | |
Plug 'ayu-theme/ayu-vim' "DH | |
Plug 'drewtempelmeyer/palenight.vim' "Cold S | |
Plug 'itchyny/landscape.vim' "DH | |
Plug 'dsolstad/vim-wombat256i' "D | |
" Langs | |
Plug 'elmcast/elm-vim' | |
Plug 'LnL7/vim-nix' | |
Plug 'leafgarland/typescript-vim' | |
Plug 'raichoo/purescript-vim' | |
Plug 'idris-hackers/idris-vim' | |
" List ends here. Plugins become visible to Vim after this call. | |
call plug#end() | |
"let ayucolor="mirage" | |
let ayucolor="dark" | |
let g:seoul256_background = 234 "233-239 Light: 252-256 | |
"colorscheme ayu | |
colorscheme one | |
" Remove all trailing spaces on file write | |
autocmd BufWritePre * %s/\s\+$//e | |
" Save session on exit | |
autocmd VimLeave * :mksession! ./session.vim | |
let g:lightline = { | |
\ 'colorscheme': 'one', | |
\ 'active': { | |
\ 'left': [ [ 'mode', 'paste' ], | |
\ [ 'gitbranch', 'readonly', 'relativepath', 'modified' ] ] | |
\ }, | |
\ 'component_function': { | |
\ 'gitbranch': 'fugitive#head' | |
\ } | |
\ } | |
let g:fzf_command_prefix = 'FZ' | |
let mapleader=" " | |
imap <A-Tab> <Esc><C-^> | |
nmap <A-Tab> <C-^> | |
nmap <Leader>n :noh<CR> | |
nmap <Leader>f :FZGFiles<CR> | |
nmap <Leader>F :FZFiles<CR> | |
nmap <Leader>b :FZBuffers<CR> | |
nmap <Leader>h :FZHistory<CR> | |
nmap <Leader>: :FZHistory:<CR> | |
nmap <Leader>l :FZBLines<CR> | |
nmap <Leader>L :FZLines<CR> | |
nmap <Leader>' :FZMarks<CR> | |
nmap <Leader>/ :FZRg<Space> | |
nmap <Leader>H :FZHelptags!<CR> | |
nmap <Leader>e :Ex<CR> | |
map <Esc><Esc> :up<CR> | |
map <A-w> "+y | |
" netrw | |
let g:netrw_altfile = 1 | |
let g:netrw_banner = 0 | |
let g:netrw_liststyle = 1 | |
" ELM | |
let g:elm_setup_keybindings = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment