dotfiles/_saved/neovim/init.vim

111 lines
2.9 KiB
VimL
Raw Normal View History

2023-01-27 19:11:04 +01:00
call plug#begin('$XDG_DATA_HOME/nvim/plugins')
2022-04-02 17:56:52 +02:00
Plug 'kamykn/skyknight'
2023-04-07 11:38:31 +02:00
Plug 'NvChad/nvim-colorizer.lua'
2020-03-03 12:46:21 +01:00
Plug 'junegunn/fzf'
Plug 'junegunn/fzf.vim'
2022-05-30 11:00:45 +02:00
Plug 'tpope/vim-commentary'
2020-03-03 12:46:21 +01:00
Plug 'itchyny/lightline.vim'
Plug 'itchyny/vim-gitbranch'
2022-04-07 18:46:58 +02:00
Plug 'airblade/vim-gitgutter'
2022-02-09 18:05:33 +01:00
Plug 'hashivim/vim-terraform'
2020-03-03 12:46:21 +01:00
Plug 'bitc/vim-bad-whitespace'
call plug#end()
2023-04-07 11:38:31 +02:00
lua require 'colorizer'.setup()
2016-06-15 13:55:21 +02:00
set number
2016-06-14 13:31:47 +02:00
set gdefault
2016-06-15 13:55:21 +02:00
set expandtab
set smartcase
2020-02-07 12:45:22 +01:00
set splitbelow
set splitright
2016-06-15 13:55:21 +02:00
set ignorecase
2022-04-07 18:46:58 +02:00
set nohlsearch
2016-06-15 13:55:21 +02:00
set noshowmode
set shiftround
2022-05-23 01:00:47 +02:00
set cursorline
2016-06-14 13:31:47 +02:00
set nowritebackup
2022-10-07 11:58:10 +02:00
set mouse=
set spelllang=en_us,pl
2016-06-15 13:55:21 +02:00
set tabstop=2
set scrolloff=5
set shortmess-=S
2021-10-27 15:43:35 +02:00
set matchpairs+=(:),{:},[:],<:>,':',":"
2022-04-07 18:46:58 +02:00
set updatetime=100
2016-06-15 13:55:21 +02:00
set shiftwidth=2
2021-04-15 14:12:37 +02:00
set showtabline=0
2016-06-15 13:55:21 +02:00
set softtabstop=2
2021-10-27 15:43:35 +02:00
2020-02-05 15:23:43 +01:00
nmap <tab> <C-w>w
2020-02-03 11:30:45 +01:00
nmap <Esc><CR> :wq!<CR>
2020-10-01 17:13:00 +02:00
nmap <C-p> :Files<CR>
nmap <C-a> :Files ~<CR>
2016-06-14 13:31:47 +02:00
2022-05-23 01:00:47 +02:00
map <leader>b <Esc>:set cc=80,120<CR>
2016-06-14 13:31:47 +02:00
map <leader>nb <Esc>:set cc=0<CR>
2023-01-27 18:12:00 +01:00
map <leader>n <Esc>:set nonumber!<CR>:GitGutterSignsToggle<CR>
2016-06-14 13:31:47 +02:00
map <leader>p <Esc>:set paste!<CR>
2022-10-14 14:49:04 +02:00
map <leader>s <Esc>:set spell!<CR>
2016-06-14 13:31:47 +02:00
2021-04-12 23:53:10 +02:00
set bg=dark
set termguicolors
2023-01-27 17:04:59 +01:00
colorscheme skyknight
2021-04-12 23:53:10 +02:00
2022-05-23 01:00:47 +02:00
hi Comment gui=italic
2023-02-09 23:16:17 +01:00
hi Normal guibg=NONE
2022-05-23 01:00:47 +02:00
hi BadWhitespace guibg=#770000
hi ColorColumn guibg=#770000
2023-01-27 17:04:59 +01:00
hi DiffChange guibg=#465457
hi DiffText guifg=#ff8700 guibg=#465457
hi FoldColumn guifg=#465457 guibg=#272822
hi GitGutterChange guifg=#bbbb00 guibg=#272822
hi LineNr guifg=#465457 guibg=#272822
2023-02-09 23:16:17 +01:00
hi NonText guifg=#465457 guibg=NONE
2023-01-27 17:04:59 +01:00
hi SignColumn guifg=#465457 guibg=#272822
2022-05-23 01:00:47 +02:00
hi Visual guibg=#005577
2022-10-14 13:31:53 +02:00
hi SpellBad guibg=#770000
2016-06-15 13:55:21 +02:00
2022-03-30 11:27:23 +02:00
let $FZF_DEFAULT_COMMAND='fd -H -L --ignore-file ~/.local/config/fd'
2020-02-05 15:23:43 +01:00
command! -bang -nargs=? -complete=dir Files
2021-04-05 15:41:38 +02:00
\ call fzf#vim#files(<q-args>, {'options': ['-e', '--layout=reverse', '--preview', 'bat --color=always --style=plain --theme=Monokai\ Extended\ Bright {}']}, <bang>0)
2020-10-15 13:59:31 +02:00
command! -bang -nargs=? -complete=dir Colors
\ call fzf#vim#colors({'options': ['-e', '--layout=reverse', '--preview', '']}, <bang>0)
2020-02-05 15:23:43 +01:00
let g:vim_json_conceal=0
2022-04-01 16:12:22 +02:00
let g:markdown_syntax_conceal=0
2022-04-07 18:46:58 +02:00
let g:gitgutter_sign_modified = '~'
let g:Hexokinase_highlighters = [ 'backgroundfull' ]
2022-04-01 16:12:22 +02:00
let g:lightline = {
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'gitbranch', 'filename' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
2020-02-05 17:28:50 +01:00
\ [ 'filetype' ] ]
\ },
\ 'component_function': {
\ 'readonly': 'LightLineReadonly',
\ 'filename': 'LightLineFilename',
\ 'gitbranch': 'gitbranch#name'
\ }
\ }
function! LightLineReadonly()
return &readonly && &filetype !=# 'help' ? '' : ''
endfunction
2020-11-03 16:51:36 +01:00
function! LightLineFilename()
let root = fnamemodify(get(b:, 'gitbranch_path'), ':h:h')
let path = expand('%:p')
if path[:len(root)-1] ==# root
return path[len(root)+1:]
endif
return expand('%')
endfunction
if filereadable(glob('~/.local/config/init.vim'))
source ~/.local/config/init.vim
endif