ULKBUZEBFCZOZ5BTUW6262LG5DK6BUOVN6STTKCFLZFG3EE6PFPAC
# vim's default session file
Session.vim
{
"languageserver": {
"clangd": {
"command": "clangd",
"rootPatterns": ["compile_flags.txt", "compile_commands.json", ".vim/", ".git/", ".hg/"],
"filetypes": ["c", "cpp", "objc", "objcpp"]
},
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"],
"filetypes": ["go"]
}
}
}
" First, setup plugins
call plug#begin('~/.local/share/nvim/plugged')
" UI Elements
Plug 'airblade/vim-gitgutter'
Plug 'junegunn/fzf'
Plug 'duff/vim-scratch'
Plug 'kshenoy/vim-signature'
Plug 'vim-airline/vim-airline'
Plug 'wesq3/vim-windowswap'
" Editing functionality
Plug 'moll/vim-bbye'
Plug 'scrooloose/syntastic'
Plug 'tomtom/tcomment_vim'
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install() }}
Plug 'tpope/vim-obsession'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-speeddating'
" Aesthetic/UI plugins
Plug 'joshdick/onedark.vim'
Plug 'sheerun/vim-polyglot'
call plug#end()
" Only redraw when necessary (makes macros run faster)
set lazyredraw
" Everything below here is plugin-specific
call plug#begin('~/.local/share/nvim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
Plug 'enricobacis/vim-airline-clock'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'ctrlpvim/ctrlp.vim'
Plug 'rust-lang/rust.vim'
Plug 'joshdick/onedark.vim'
Plug 'sheerun/vim-polyglot'
Plug 'ryanoasis/vim-devicons'
call plug#end()
" Extra file types
au BufRead,BufNewFile *.glslv setfiletype glsl
au BufRead,BufNewFile *.glslf setfiletype glsl
" automatically display the file browser
autocmd vimenter * NERDTree
" netrw configuration
let g:netrw_liststyle = 3 " use tree view by default
let g:netrw_banner = 0 " turn off the help banner
let g:netrw_winsize = 25 " default window size
let g:netrw_bufsettings = 'noma nomod nu nobl nowrap ro' " add line numbers to netrw
" delete a buffer without deleting the window
nnoremap <leader>q :Bdelete<cr>
" Open the file explorer in the current window
nnoremap <leader>t :Explore<cr>
" Quickly splitting windows
nnoremap <leader>v <C-w>v
nnoremap <leader>f :FZF<cr>
" nnoremap <leader>s :ToggleWorkspace<cr>
nnoremap <leader>ss :Obsess<cr>
nnoremap <leader>sd :Obsess!<cr>
nnoremap <leader>so :Scratch<cr>
" Quick, section-based folding
nnoremap <leader>z zfi{