set autoread set autowrite set backspace=2 set breakindent set clipboard=unnamed set cmdheight=2 set colorcolumn=+1 set complete+=kspell set cursorline set diffopt+=vertical set encoding=utf-8 set expandtab set exrc set fillchars=vert:▐ set foldmethod=expr set foldexpr=nvim_treesitter#foldexpr() set hidden set history=50 set incsearch set laststatus=2 set listchars=tab:▸\ ,eol:↴,nbsp:␣,trail:•,space:⋅,extends:→,precedes:← set list set modelines=0 set mouse=a set nobackup set nojoinspaces set nomodeline set noswapfile set nowritebackup set number set numberwidth=5 set ruler set scrolloff=12 set shiftround set shiftwidth=2 set shortmess+=c set showbreak=·· set showcmd set signcolumn=yes set smartcase set splitbelow set splitright set tabstop=2 set termencoding=utf-8 set textwidth=80 set title set ttyfast set updatetime=300 set vb t_vb= syntax enable syntax sync minlines=128 maxlines=512 " Cursor shapes let &t_SI = "\[6 q" let &t_SR = "\[4 q" let &t_EI = "\[0 q" if executable('rg') " Use rg over grep set grepprg=rg\ --color\ never endif " Install vim-plug if not found if empty(glob('~/.vim/autoload/plug.vim')) silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif " Plugins call plug#begin('~/.vim/plugged') if filereadable(expand("~/.config/nvim/plugins.vimrc")) source ~/.config/nvim/plugins.vimrc " Run PlugInstall if there are missing plugins autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)')) \| PlugInstall --sync | source ~/.config/nvim/plugins.vimrc \| endif endif call plug#end() " Keybindings if filereadable(expand("~/.config/nvim/keybindings.vimrc")) source ~/.config/nvim/keybindings.vimrc endif " Git setup if filereadable(expand("~/.config/nvim/git.vimrc")) source ~/.config/nvim/git.vimrc endif " Autocomplete if has_key(g:plugs, "nvim-cmp") && filereadable(expand("~/.config/nvim/nvim-cmp.vimrc")) source ~/.config/nvim/nvim-cmp.vimrc endif " Autopairs if has_key(g:plugs, "nvim-autopairs") && has_key(g:plugs, "treesitter.nvim") && filereadable(expand("~/.config/nvim/autopairs.vimrc")) source ~/.config/nvim/autopairs.vimrc endif " LSP if has_key(g:plugs, "nvim-lspconfig") && has_key(g:plugs, "cmp-nvim-lsp") && filereadable(expand("~/.config/nvim/lspconfig.vimrc")) source ~/.config/nvim/lspconfig.vimrc endif " Gitsigns setup if has_key(g:plugs, "gitsigns.nvim") && filereadable(expand("~/.config/nvim/gitsigns.vimrc")) source ~/.config/nvim/gitsigns.vimrc endif " Telescope setup if has_key(g:plugs, "telescope.nvim") && filereadable(expand("~/.config/nvim/telescope.vimrc")) source ~/.config/nvim/telescope.vimrc endif " Search if has_key(g:plugs, "nvim-hlslens") && filereadable(expand("~/.config/nvim/hlslens.vimrc")) source ~/.config/nvim/hlslens.vimrc endif " Lightline setup if has_key(g:plugs, "lightline.vim") && filereadable(expand("~/.config/nvim/lightline.vimrc")) source ~/.config/nvim/lightline.vimrc endif " Tmuxline setup if has_key(g:plugs, "tmuxline.vim") && filereadable(expand("~/.config/nvim/tmuxline.vimrc")) source ~/.config/nvim/tmuxline.vimrc endif " Indent setup if has_key(g:plugs, "indent-blankline.nvim") && filereadable(expand("~/.config/nvim/lua/indent.lua")) lua require('indent') endif " Scrollbar if has_key(g:plugs, "nvim-scrollbar") && filereadable(expand("~/.config/nvim/scrollbar.vimrc")) source ~/.config/nvim/scrollbar.vimrc endif " Tree setup if has_key(g:plugs, "nvim-tree.lua") && filereadable(expand("~/.config/nvim/nvimtree.vimrc")) source ~/.config/nvim/nvimtree.vimrc endif " Projections if has_key(g:plugs, "vim-projectionist") && filereadable(expand("~/.config/nvim/projections.vimrc")) source ~/.config/nvim/projections.vimrc endif " Test setup if has_key(g:plugs, "vim-test") && filereadable(expand("~/.config/nvim/test.vimrc")) source ~/.config/nvim/test.vimrc endif " Markdown setup if has_key(g:plugs, "vim-markdown") && filereadable(expand("~/.config/nvim/markdown.vimrc")) source ~/.config/nvim/markdown.vimrc endif " Rust tools if has_key(g:plugs, "rust-tools.nvim") && has_key(g:plugs, "nvim-lspconfig") && filereadable(expand("~/.config/nvim/rust-tools.vimrc")) source ~/.config/nvim/rust-tools.vimrc endif " Color setup if has_key(g:plugs, "sonokai") && filereadable(expand("~/.config/nvim/colors.vimrc")) source ~/.config/nvim/colors.vimrc endif " Set secure AFTER any other rc importing set secure