Skip to content

Instantly share code, notes, and snippets.

@chearon
Last active September 6, 2022 07:09
Show Gist options
  • Save chearon/241637664ba70b167004cf3ae975f039 to your computer and use it in GitHub Desktop.
Save chearon/241637664ba70b167004cf3ae975f039 to your computer and use it in GitHub Desktop.
The best possible neovim configuration
" Neovim-only, use in true color terminal
" Vundle config
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" Vundle vundles
Plugin 'VundleVim/Vundle.vim'
Plugin 'ap/vim-css-color'
Plugin 'hail2u/vim-css3-syntax'
Plugin 'groenewege/vim-less'
Plugin 'mustache/vim-mustache-handlebars'
Plugin 'scrooloose/nerdtree'
Plugin 'tpope/vim-fugitive'
Plugin 'airblade/vim-gitgutter'
Plugin 'vim-airline/vim-airline'
Plugin 'junegunn/fzf'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'w0rp/ale'
Plugin 'jacoborus/tender'
Plugin 'alunny/pegjs-vim'
Plugin 'rust-lang/rust.vim'
Plugin 'dag/vim-fish'
Plugin 'sgur/vim-editorconfig'
Plugin 'pangloss/vim-javascript'
Plugin 'digitaltoad/vim-pug'
Plugin 'leafgarland/typescript-vim'
Plugin 'kristijanhusak/vim-hybrid-material'
Plugin 'keith/swift.vim'
Plugin 'mbbill/undotree'
Plugin 'posva/vim-vue'
Plugin 'Quramy/tsuquyomi'
Plugin 'Shougo/vimproc.vim'
" End Vundle
call vundle#end()
filetype plugin indent on
" Tabs
set tabstop=2
set shiftwidth=2
set expandtab
au FileType make setlocal noexpandtab
" Override editorconfig
" We add the BufReadPost, BufNewFile autocmds in VimEnter so that they run
" after the plugin runs (apparently the events are not added at this point
" in vimrc). Also set it right in VimEnter since it fires after Buf autocmds
au VimEnter * set tabstop=2 shiftwidth=2|au BufReadPost,BufNewFile * set tabstop=2 shiftwidth=2
" Indent
set autoindent
set smartindent
" Editorconfig
let g:editorconfig_blacklist = {'filetype': ['git.*']}
" Misc
set inccommand=split
set incsearch
set mouse=a
set hidden " allow switching from unsaved buffers to others
let $FZF_DEFAULT_COMMAND = 'ag -g ""'
" Editor features
set cursorline
set number
" Visuals
syntax on
" set termguicolors
set background=dark
colorscheme hybrid_material
hi VertSplit ctermbg=235 ctermfg=235
set go-=L " remove left scrollbar
set go-=r " remove right scrollbar
let g:vue_disable_pre_processors=1
" Visuals: ALE
highlight ALEWarningSign guifg=#f0f166
highlight ALEErrorSign guifg=#ff4d47
let g:ale_sign_error = '✖︎'
let g:ale_sign_warning = '⚠'
" Visuals: airline
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_powerline_fonts = 1 " https://github.com/bling/vim-airline/wiki/FAQ
let g:airline#extensions#whitespace#enabled = 0 " too obtrusive
let g:airline_theme = "tender"
"let g:airline#extensions#tabline#enabled = 1
"let g:airline#extensions#tabline#buffer_nr_show = 1
"let g:airline#extensions#tabline#buffer_nr_format = "%s:"
let g:airline#extensions#hunks#enabled = 0 " no room :(
let g:airline_section_y = '' " no room :'(
let g:airline#extensions#syntastic#enabled = 1
let g:airline#extensions#branch#enabled = 0 " just nevever found it that useful :/
" Visuals: gitgutter
hi SignColumn guibg=#222222
hi GitGutterAdd guibg=#222222 guifg=#afd702
hi GitGutterDelete guibg=#222222 guifg=#ff4d47
hi GitGutterChange guibg=#222222 guifg=#0087af
hi GitGutterChangeDelete guibg=#222222 guifg=#0087af
set laststatus=2
" Maps
nmap <C-o> :FZF<CR>
autocmd FileType typescript nmap <buffer> <Leader>t : <C-u>echo tsuquyomi#hint()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment