2021-06-14 14:20:50 -05:00
|
|
|
set autoread
|
|
|
|
set autowrite
|
|
|
|
set backspace=2
|
|
|
|
set breakindent
|
|
|
|
set clipboard=unnamed
|
2021-07-06 00:29:14 -05:00
|
|
|
set cmdheight=2
|
2021-06-14 14:20:50 -05:00
|
|
|
set colorcolumn=+1
|
|
|
|
set complete+=kspell
|
|
|
|
set cursorline
|
|
|
|
set diffopt+=vertical
|
|
|
|
set encoding=utf-8
|
|
|
|
set expandtab
|
|
|
|
set exrc
|
|
|
|
set fillchars=vert:▐
|
2021-09-15 15:35:52 -05:00
|
|
|
set foldmethod=expr
|
|
|
|
set foldexpr=nvim_treesitter#foldexpr()
|
2021-07-06 00:29:14 -05:00
|
|
|
set hidden
|
2021-06-14 14:20:50 -05:00
|
|
|
set history=50
|
|
|
|
set incsearch
|
|
|
|
set laststatus=2
|
2021-09-15 12:39:08 -05:00
|
|
|
set listchars=tab:▸\ ,eol:↴,nbsp:␣,trail:•,space:⋅,extends:→,precedes:←
|
|
|
|
set list
|
2021-06-14 14:20:50 -05:00
|
|
|
set modelines=0
|
|
|
|
set mouse=a
|
|
|
|
set nobackup
|
|
|
|
set nojoinspaces
|
|
|
|
set nomodeline
|
|
|
|
set noswapfile
|
|
|
|
set nowritebackup
|
|
|
|
set number
|
|
|
|
set numberwidth=5
|
|
|
|
set ruler
|
2021-07-14 16:06:10 -05:00
|
|
|
set scrolloff=12
|
2021-06-14 14:20:50 -05:00
|
|
|
set shiftround
|
|
|
|
set shiftwidth=2
|
2021-07-06 00:29:14 -05:00
|
|
|
set shortmess+=c
|
2021-06-14 14:20:50 -05:00
|
|
|
set showbreak=··
|
|
|
|
set showcmd
|
|
|
|
set signcolumn=yes
|
2021-07-14 16:06:10 -05:00
|
|
|
set smartcase
|
2021-06-14 14:20:50 -05:00
|
|
|
set splitbelow
|
|
|
|
set splitright
|
|
|
|
set tabstop=2
|
|
|
|
set termencoding=utf-8
|
|
|
|
set textwidth=80
|
|
|
|
set title
|
|
|
|
set ttyfast
|
2021-07-06 00:29:14 -05:00
|
|
|
set updatetime=300
|
2021-06-14 14:20:50 -05:00
|
|
|
set vb t_vb=
|
|
|
|
|
|
|
|
syntax enable
|
|
|
|
syntax sync minlines=128 maxlines=512
|
|
|
|
|
|
|
|
" Cursor shapes
|
|
|
|
let &t_SI = "\<Esc>[6 q"
|
|
|
|
let &t_SR = "\<Esc>[4 q"
|
|
|
|
let &t_EI = "\<Esc>[0 q"
|
|
|
|
|
2021-08-06 12:49:41 -05:00
|
|
|
if executable('rg')
|
|
|
|
" Use rg over grep
|
|
|
|
set grepprg=rg\ --color\ never
|
|
|
|
endif
|
|
|
|
|
2022-03-11 15:49:48 -06:00
|
|
|
" 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
|
|
|
|
|
2021-06-14 14:20:50 -05:00
|
|
|
" Plugins
|
|
|
|
call plug#begin('~/.vim/plugged')
|
2021-07-12 15:53:20 -05:00
|
|
|
if filereadable(expand("~/.config/nvim/plugins.vimrc"))
|
2021-07-12 15:55:25 -05:00
|
|
|
source ~/.config/nvim/plugins.vimrc
|
2022-03-11 15:49:48 -06:00
|
|
|
|
|
|
|
" 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
|
2021-06-14 14:20:50 -05:00
|
|
|
endif
|
|
|
|
call plug#end()
|
|
|
|
|
2022-03-11 15:49:48 -06:00
|
|
|
" 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
|
|
|
|
|
2021-10-13 11:32:56 -05:00
|
|
|
" Autocomplete
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "nvim-cmp") && filereadable(expand("~/.config/nvim/nvim-cmp.vimrc"))
|
2021-10-13 11:32:56 -05:00
|
|
|
source ~/.config/nvim/nvim-cmp.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-10-28 13:05:21 -05:00
|
|
|
" Autopairs
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "nvim-autopairs") && has_key(g:plugs, "treesitter.nvim") && filereadable(expand("~/.config/nvim/autopairs.vimrc"))
|
2021-10-28 13:05:21 -05:00
|
|
|
source ~/.config/nvim/autopairs.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-10-13 11:32:56 -05:00
|
|
|
" LSP
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "nvim-lspconfig") && has_key(g:plugs, "cmp-nvim-lsp") && filereadable(expand("~/.config/nvim/lspconfig.vimrc"))
|
2021-10-13 11:21:50 -05:00
|
|
|
source ~/.config/nvim/lspconfig.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-10-19 15:04:57 -05:00
|
|
|
" Gitsigns setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "gitsigns.nvim") && filereadable(expand("~/.config/nvim/gitsigns.vimrc"))
|
2021-10-19 15:04:57 -05:00
|
|
|
source ~/.config/nvim/gitsigns.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-10-20 10:21:22 -05:00
|
|
|
" Telescope setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "telescope.nvim") && filereadable(expand("~/.config/nvim/telescope.vimrc"))
|
2021-10-20 10:21:22 -05:00
|
|
|
source ~/.config/nvim/telescope.vimrc
|
|
|
|
endif
|
|
|
|
|
2022-01-07 12:44:44 -06:00
|
|
|
" Search
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "nvim-hlslens") && filereadable(expand("~/.config/nvim/hlslens.vimrc"))
|
2022-01-07 12:44:44 -06:00
|
|
|
source ~/.config/nvim/hlslens.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-06-14 14:20:50 -05:00
|
|
|
" Lightline setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "lightline.vim") && filereadable(expand("~/.config/nvim/lightline.vimrc"))
|
2021-07-12 15:55:25 -05:00
|
|
|
source ~/.config/nvim/lightline.vimrc
|
2021-06-14 14:20:50 -05:00
|
|
|
endif
|
|
|
|
|
2021-06-16 11:31:28 -05:00
|
|
|
" Tmuxline setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "tmuxline.vim") && filereadable(expand("~/.config/nvim/tmuxline.vimrc"))
|
2021-07-12 15:55:25 -05:00
|
|
|
source ~/.config/nvim/tmuxline.vimrc
|
2021-06-16 11:31:28 -05:00
|
|
|
endif
|
|
|
|
|
2021-09-15 12:39:08 -05:00
|
|
|
" Indent setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "indent-blankline.nvim") && filereadable(expand("~/.config/nvim/lua/indent.lua"))
|
2021-09-15 12:39:08 -05:00
|
|
|
lua require('indent')
|
|
|
|
endif
|
|
|
|
|
2022-01-07 12:31:29 -06:00
|
|
|
" Scrollbar
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "nvim-scrollbar") && filereadable(expand("~/.config/nvim/scrollbar.vimrc"))
|
2022-01-07 12:31:29 -06:00
|
|
|
source ~/.config/nvim/scrollbar.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-09-15 15:35:52 -05:00
|
|
|
" Tree setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "nvim-tree.lua") && filereadable(expand("~/.config/nvim/nvimtree.vimrc"))
|
2021-08-18 11:20:48 -05:00
|
|
|
source ~/.config/nvim/nvimtree.vimrc
|
2021-06-16 16:30:55 -05:00
|
|
|
endif
|
|
|
|
|
2021-08-09 11:58:16 -05:00
|
|
|
" Projections
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "vim-projectionist") && filereadable(expand("~/.config/nvim/projections.vimrc"))
|
2021-08-09 11:58:16 -05:00
|
|
|
source ~/.config/nvim/projections.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-06-17 15:05:59 -05:00
|
|
|
" Test setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "vim-test") && filereadable(expand("~/.config/nvim/test.vimrc"))
|
2021-07-12 15:55:25 -05:00
|
|
|
source ~/.config/nvim/test.vimrc
|
2021-06-17 15:05:59 -05:00
|
|
|
endif
|
|
|
|
|
2021-08-06 12:49:41 -05:00
|
|
|
" Markdown setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "vim-markdown") && filereadable(expand("~/.config/nvim/markdown.vimrc"))
|
2021-07-14 16:06:10 -05:00
|
|
|
source ~/.config/nvim/markdown.vimrc
|
|
|
|
endif
|
|
|
|
|
2022-02-17 17:20:24 -06:00
|
|
|
" Rust tools
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "rust-tools.nvim") && has_key(g:plugs, "nvim-lspconfig") && filereadable(expand("~/.config/nvim/rust-tools.vimrc"))
|
2022-02-17 17:20:24 -06:00
|
|
|
source ~/.config/nvim/rust-tools.vimrc
|
|
|
|
endif
|
|
|
|
|
2021-06-14 14:20:50 -05:00
|
|
|
" Color setup
|
2022-03-11 15:49:48 -06:00
|
|
|
if has_key(g:plugs, "sonokai") && filereadable(expand("~/.config/nvim/colors.vimrc"))
|
2021-07-12 15:55:25 -05:00
|
|
|
source ~/.config/nvim/colors.vimrc
|
2021-06-14 14:20:50 -05:00
|
|
|
endif
|
|
|
|
|
|
|
|
" Set secure AFTER any other rc importing
|
|
|
|
set secure
|