vim9script
autocmd BufRead *vimplugrc set ft=vim

execute 'source' fnameescape(g:plug)
plug#begin(g:plugdir)
Plug 'junegunn/vim-plug'
Plug 'lifepillar/vim-solarized8'

Plug 'hashivim/vim-terraform'
Plug 'itchyny/lightline.vim'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-easy-align'
Plug 'mhinz/vim-signify'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rsi'
Plug 'tpope/vim-vinegar'
Plug 'w0rp/ale', {'for': ['sh']}
plug#end()

# easy-align
xmap <Leader>a <Plug>(EasyAlign)
nmap <Leader>a <Plug>(EasyAlign)

# fzf
nmap <Leader>ff :Files<CR>
nmap <Leader>fg :GFiles<CR>
nmap <Leader>fb :Buffers<CR>
nmap <Leader>fl :Lines<CR>
nmap <Leader>ft :Filetypes<CR>

# lightline
g:lightline = {
    colorscheme:  'solarized',
    separator:    { left: '', right: ''},
    subseparator: { left: '\u2022', right: '\u2022'}
}

if has('gui_running')
    set guifont=VascadiaMod:h14
    set guicursor=a:blinkon0,a:block,i:ver1-Cursor/lCursor,r:hor1-Cursor/lCursor
    set guiheadroom=0 guioptions=aei mouse=a
    map  <S-Insert> <MiddleMouse>
    map! <S-Insert> <MiddleMouse>
endif

g:solarized_extra_hi_groups = 1
&t_8f = "\u1b[38;2;%lu;%lu;%lum"
&t_8b = "\u1b[48;2;%lu;%lu;%lum"
&tgc  = 1
&bg   = 'light'
colorscheme solarized8