dotfiles/nvim/init.vim

98 lines
2.6 KiB
VimL

call plug#begin('$XDG_DATA_HOME/nvim/vim-plugins')
Plug 'ayu-theme/ayu-vim'
Plug 'kamykn/skyknight'
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
Plug 'tpope/vim-commentary'
Plug 'itchyny/lightline.vim'
Plug 'airblade/vim-gitgutter'
Plug 'hashivim/vim-terraform'
Plug 'bitc/vim-bad-whitespace'
Plug 'RRethy/vim-hexokinase', { 'do': 'make hexokinase' }
call plug#end()
set number
set gdefault
set expandtab
set smartcase
set splitbelow
set splitright
set ignorecase
set nohlsearch
set noshowmode
set shiftround
set cursorline
set nowritebackup
set mouse=
set spelllang=en_us,pl
set tabstop=2
set scrolloff=5
set shortmess-=S
set matchpairs+=(:),{:},[:],<:>,':',":"
set updatetime=100
set shiftwidth=2
set showtabline=0
set softtabstop=2
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=80,120<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>
map <leader>s <Esc>:set spell!<CR>
set bg=dark
set termguicolors
let ayucolor='dark'
colorscheme ayu
hi Comment gui=italic
hi BadWhitespace guibg=#770000
hi ColorColumn guibg=#770000
hi DiffChange guibg=#0f1419
hi DiffText guifg=#ff8700
" hi FoldColumn guifg=#465457 guibg=#272822
" hi GitGutterChange guifg=#bbbb00 guibg=#272822
" hi LineNr guifg=#465457 guibg=#272822
" hi NonText guifg=#465457 guibg=#272822
hi SignColumn guibg=#0f1419
hi Visual guibg=#005577
hi SpellBad guibg=#770000
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:gitgutter_sign_modified = '~'
let g:Hexokinase_highlighters = [ 'backgroundfull' ]
let g:lightline = {
\ 'colorscheme': 'ayu',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'filetype' ] ]
\ },
\ 'component_function': {
\ 'readonly': 'LightLineReadonly'},
\ }
function! LightLineReadonly()
return &readonly && &filetype !=# 'help' ? '' : ''
endfunction
if filereadable(glob('~/.local/config/init.vim'))
source ~/.local/config/init.vim
endif