This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/apps/neovim/settings.vim

169 lines
4.1 KiB
VimL
Raw Normal View History

scriptencoding utf8
2019-02-04 01:43:53 -06:00
" ALE completeopt recommendation
set completeopt=menu,menuone,preview,noselect,noinsert
2018-11-01 11:06:55 -05:00
" line number defaults
set nonumber
set norelativenumber
" different settings if using vim as a manpage viewer
" if exists('asmanviewer')
" set nonumber " no line numbers when viewing a man page
" set norelativenumber " no line numbers when viewing a man page
" else
" set nonumber " line numbers
" set norelativenumber " line numbers
" endif
2019-02-04 01:43:53 -06:00
" use tabs at a two-space width like God intended
set tabstop=2
set shiftwidth=2
set softtabstop=2
set noexpandtab
" auto/smart indent
set autoindent smartindent
" show certain whitespace characters
set list
set nostartofline
set listchars=trail,tab:\ \ ,trail:~
" set listchars=eol:\ ,tab:>-,trail:~,extends:>,precedes:<,space:·
" try and keep text (and code) to a width of 80 characters
set wrap
set linebreak
set breakindent
set textwidth=80
set formatoptions=crql1j " :h fo-table
" handle window title
set title
2019-02-04 01:43:53 -06:00
" limit syntax highlighting line length
set synmaxcol=500
" don't highlight the current line
set nocursorline
2019-02-04 01:43:53 -06:00
" don't highlight the current column
" set nocursorcolumn
" OBSOLETE: colors columns past 80
" let &colorcolumn=join(range(81,400),",")
" highlight the 81st character in a line where it exists
highlight ColorColumn ctermbg=magenta ctermfg=7
call matchadd('ColorColumn', '\%81v', 100)
2019-02-04 01:43:53 -06:00
" set noshowcmd
" set nowildmenu
" set wildmode=longest,list,full
set cpoptions-=$ " make buffer options more global
set noshowmatch " don't briefly highlight matching brackets
set mouse=a " enable mouse use
set mousehide " hide mouse when typing
set backspace=indent,eol,start " sane backspace
set noruler " hide the ruler - we have airline
set lazyredraw " don't draw during macros and other such things
set scrolloff=8 " keep lines above and below cursor (padding)
set sidescrolloff=15 " same but for columns
set splitright " don't split left
set splitbelow " don't split top
set noerrorbells " shhhh, vim
set visualbell " but visual noise for alerts is ok
set nobackup " sessions handle this quite nicely
set nowritebackup " no but really they do
set noswapfile " no seriously sessions are cool
set timeout " key combo mapping timeout
2019-11-17 09:05:56 -06:00
set ttimeoutlen=100 " ms delay for tapping key combos
set timeoutlen=150 " ms for key combo mapping timeout
2019-02-04 01:43:53 -06:00
set isfname+=32 " allow filenames to show them 32s
" no freakin' bell
set visualbell t_vb=
if has('autocmd')
2019-03-13 07:36:53 -05:00
augroup DisableVisualBell
autocmd GUIEnter * set visualbell t_vb=
augroup END
endif
" color scheme
2020-01-17 03:02:53 -06:00
let base16colorspace=16
set background=dark
syntax enable
colorscheme base16-donokai
" hide stuff
highlight SignColumn ctermbg=black guibg=black
highlight GitGutterAdd ctermbg=black guibg=black
highlight GitGutterDelete ctermbg=black guibg=black
highlight GitGutterChange ctermbg=black guibg=black
highlight GitGutterChangeDelete ctermbg=black guibg=black
hi NonText ctermfg=black guifg=black
set hidden " allows buffer switching without saving
2019-12-12 11:02:24 -06:00
set shortmess+=Ia " hide vim intro, skip lots of file messages/prompts
set history=1000
" undo files
set undofile
set undodir=$vimdir/undo
set undolevels=1000
set undoreload=10000
" spell file
set spellfile=$vimdir/spell/en.utf-8.add
2019-02-04 01:43:53 -06:00
" more sane search settings
set ignorecase
set smartcase
set incsearch
set wrapscan
2019-02-04 01:43:53 -06:00
" highlight search matches
set hlsearch
" enable syntax folding
set foldmethod=syntax
set foldlevel=99
set foldnestmax=10
2019-02-04 10:16:08 -06:00
set foldlevelstart=99
2019-02-04 01:43:53 -06:00
set noautowrite " let me do the writing
set autochdir " `:e` all day
set autoread " this is fine with `u`
set nomodeline " airline wins
set noshowmode " airline is really good
set noshowcmd " be clean
2019-02-04 01:43:53 -06:00
set laststatus=0 " be clean
2019-02-04 01:43:53 -06:00
" yank to OS clipboard by default
2018-11-08 07:32:36 -06:00
set clipboard+=unnamedplus
" no empty buffer on startup
augroup DisableEmptyBuffer
autocmd VimEnter * nested if bufname('')=='' && line('$') == 1 && col('$')==1 && !&modified | bd % | endif
augroup END
" modify higlight colors
hi Search cterm=NONE ctermbg=blue ctermfg=black
highlight LineNr ctermbg=none ctermfg=8
highlight CursorLineNr ctermbg=18 ctermfg=gray
hi IndentGuidesEven ctermbg=18
hi Normal ctermbg=NONE
2019-09-26 12:04:23 -05:00
" lsp config
" ale
" set completeopt=noinsert,menuone,noselect,longest,preview
" coc