dotfiles/vim/vimrc

104 lines
2.6 KiB
VimL

set runtimepath=$XDG_CONFIG_HOME/vim,$VIMRUNTIME
set viminfofile=$XDG_CACHE_HOME/viminfo
call plug#begin('$XDG_DATA_HOME/vim-plugins')
Plug 'kamykn/skyknight'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'dense-analysis/ale'
Plug 'Yggdroot/indentLine'
Plug 'RRethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'itchyny/lightline.vim'
Plug 'airblade/vim-gitgutter'
Plug 'hashivim/vim-terraform'
Plug 'bitc/vim-bad-whitespace'
call plug#end()
set title
set number
set gdefault
set wildmenu
set nobackup
set incsearch
set expandtab
set smartcase
set splitbelow
set splitright
set ignorecase
set autoindent
set nohlsearch
set noshowmode
set shiftround
set nojoinspaces
set nowritebackup
set bs=2
set tabstop=2
set scrolloff=5
set shortmess-=S
set backspace=eol,start,indent
set matchpairs+=(:),{:},[:],<:>,':',":"
set laststatus=2
set updatetime=100
set shiftwidth=2
set showtabline=0
set softtabstop=2
set winminheight=0
nmap <tab> <C-w>w
nmap <Esc><CR> :wq!<CR>
nmap <C-p> :Files<CR>
nmap <C-a> :Files ~<CR>
map <leader>b <Esc>:set cc=79<CR>
map <leader>nb <Esc>:set cc=0<CR>
map <leader>n <Esc>:set nonumber!<CR>:IndentLinesToggle<CR>:GitGutterSignsToggle<CR>
map <leader>p <Esc>:set paste!<CR>
set bg=dark
set termguicolors
colorscheme skyknight
let &t_SI = "\<Esc>[6 q"
let &t_SR = "\<Esc>[4 q"
let &t_EI = "\<Esc>[2 q"
hi BadWhitespace guibg=red
hi Comment cterm=italic gui=italic
hi GitGutterChange guifg=#bbbb00 guibg=#232526
hi LineNr guifg=#465457 guibg=#232526
hi NonText guibg=NONE
hi Normal guibg=NONE
hi SignColumn guifg=#465457 guibg=#232526
hi Visual guifg=#ffffff guibg=#005577
let $FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.local/config/fd'
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, {'options': ['-e', '--layout=reverse', '--preview', 'bat --color=always --style=plain --theme=Monokai\ Extended\ Bright {}']}, <bang>0)
command! -bang -nargs=? -complete=dir Colors
\ call fzf#vim#colors({'options': ['-e', '--layout=reverse', '--preview', '']}, <bang>0)
let g:vim_json_conceal=0
let g:markdown_syntax_conceal=0
let g:Hexokinase_highlighters = [ 'backgroundfull' ]
let g:gitgutter_sign_modified = '~'
let g:lightline = {
\ 'colorscheme': 'powerline',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'filetype' ] ]
\ },
\ 'component_function': {
\ 'readonly': 'LightLineReadonly'},
\ }
function! LightLineReadonly()
return &readonly && &filetype !=# 'help' ? '' : ''
endfunction
source ~/.local/config/vimrc