diff --git a/.config/Xresources b/.config/Xresources index 4464b88..7977998 100644 --- a/.config/Xresources +++ b/.config/Xresources @@ -53,4 +53,3 @@ st.font: Monospace:pixelsize=13:antialias=true:autohint=true:hintstyle=hintmediu ! white *.color7: #cccccc - diff --git a/.config/nvim/bindings.vim b/.config/nvim/bindings.vim index 7f770e9..0423bce 100644 --- a/.config/nvim/bindings.vim +++ b/.config/nvim/bindings.vim @@ -5,18 +5,6 @@ let mapleader = ' ' let g:move_key_modifier = 'A' -"~~~~~ -" Git -"~~~~~ -" Show git commit list -map gv :GV - -" Show status -nnoremap gs :Git - -" Pull -nnoremap gpu :Gpull - "~~~~~~~~~~~~~~~~~ " File Management "~~~~~~~~~~~~~~~~~ @@ -24,12 +12,6 @@ nnoremap gpu :Gpull nmap f :Files nmap fg :GFiles -" vifm -nmap r :Vifm - -" NERDTree -map n :NERDTreeToggle - "~~~~~~~~~ " Linters "~~~~~~~~~ @@ -48,10 +30,6 @@ map ad :ALEDetail map ag :ALEGoToDefinitionInSplit map aG :ALEGoToDefinition -" LSP -" nnoremap :LspNextDiagnostic -" nnoremap :LspPreviousDiagnostic - " Spell-check (English US and Polish) map :setlocal spell! spelllang=en_us map :setlocal spell! spelllang=pl @@ -65,25 +43,15 @@ map :tabclose nnoremap gt nnoremap gT -" Split Managment -nnoremap -nnoremap -nnoremap -nnoremap - " Open terminal noremap :split term://zsh:resize 10 " Exit from terminal mode tnoremap - "~~~~~~~ " Other "~~~~~~~ -" Sudo read-only file -cnoremap sudow w !sudo tee % >/dev/null - " Disable hlsearch map :noh diff --git a/.config/nvim/colors/biual.vim b/.config/nvim/colors/biual.vim index 48785e7..1b26e24 100644 --- a/.config/nvim/colors/biual.vim +++ b/.config/nvim/colors/biual.vim @@ -1,12 +1,12 @@ -" -" ██ -" ░██ +" +" ██ +" ░██ " █████ ██████ ░██ ██████ ██████ ██████ -" ██░░░██ ██░░░░██ ░██ ██░░░░██░░██░░█ ██░░░░ -" ░██ ░░ ░██ ░██ ░██░██ ░██ ░██ ░ ░░█████ +" ██░░░██ ██░░░░██ ░██ ██░░░░██░░██░░█ ██░░░░ +" ░██ ░░ ░██ ░██ ░██░██ ░██ ░██ ░ ░░█████ " ░██ ██░██ ░██ ░██░██ ░██ ░██ ░░░░░██ -" ░░█████ ░░██████ ███░░██████ ░███ ██████ -" ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░ +" ░░█████ ░░██████ ███░░██████ ░███ ██████ +" ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░ if exists('syntax_on') syntax reset @@ -14,54 +14,54 @@ endif hi clear -hi TabLine ctermfg=NONE ctermbg=NONE cterm=NONE -hi TabLineSel ctermfg=4 ctermbg=NONE cterm=bold -hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE -hi Title ctermfg=15 ctermbg=NONE cterm=NONE - -hi LineNr ctermfg=6 cterm=NONE -hi CursorLineNr ctermfg=5 cterm=bold -hi ColorColumn ctermfg=1 ctermbg=0 cterm=undercurl -hi SignColumn ctermfg=7 -hi VertSplit ctermfg=0 ctermbg=8 - -hi Comment ctermfg=4 -hi String ctermfg=1 - -hi Visual ctermbg=8 -hi Search ctermbg=8 cterm=bold,reverse -hi MatchParen ctermfg=3 ctermbg=0 cterm=bold -hi Statement ctermfg=3 - -hi ErrorMsg ctermfg=1 ctermbg=none -hi Error ctermfg=0 ctermbg=1 cterm=undercurl - -hi SpellBad ctermfg=0 ctermbg=1 cterm=undercurl -hi SpellCap ctermfg=0 ctermbg=2 cterm=undercurl -hi SpellRare ctermfg=0 ctermbg=none cterm=undercurl -hi SpellLocal ctermfg=0 ctermbg=5 cterm=undercurl - -hi DiffAdd ctermfg=0 ctermbg=2 -hi DiffChange ctermfg=0 ctermbg=4 -hi DiffDelete ctermfg=0 ctermbg=1 -hi DiffText ctermfg=0 ctermbg=4 - -hi Folded ctermbg=8 -hi FoldColumn ctermbg=8 - -hi Pmenu ctermfg=4 ctermbg=233 -hi PmenuSel ctermfg=4 ctermbg=8 -hi PmenuThumb ctermfg=8 ctermbg=8 -hi PmenuSbar ctermfg=0 ctermbg=0 -hi StatusLineNC ctermfg=8 ctermbg=NONE cterm=bold -hi StatusLine ctermfg=5 ctermbg=NONE cterm=NONE -hi MyStatuslineFilename ctermfg=4 ctermbg=NONE -hi MyStatuslineFiletype ctermfg=9 ctermbg=none cterm=italic +hi TabLine ctermfg=NONE ctermbg=NONE cterm=NONE +hi TabLineSel ctermfg=4 ctermbg=NONE cterm=bold +hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE +hi Title ctermfg=15 ctermbg=NONE cterm=NONE -hi MyStatuslineLineCol ctermfg=35 ctermbg=none cterm=none -hi MyStatuslineLinePerc ctermfg=2 ctermbg=none cterm=none -hi CursorLine ctermbg=8 cterm=NONE -hi CursorColumn ctermbg=8 cterm=NONE +hi LineNr ctermfg=238 cterm=none +hi CursorLineNr ctermfg=220 ctermbg=8 cterm=bold +hi ColorColumn ctermfg=1 ctermbg=0 cterm=undercurl +hi SignColumn ctermfg=7 +hi VertSplit ctermfg=0 ctermbg=8 + +hi Comment ctermfg=4 +hi String ctermfg=1 + +hi Visual ctermbg=8 +hi Search ctermbg=8 cterm=bold,reverse +hi MatchParen ctermfg=3 ctermbg=0 cterm=bold +hi Statement ctermfg=3 + +hi ErrorMsg ctermfg=1 ctermbg=none +hi Error ctermfg=0 ctermbg=1 cterm=undercurl + +hi SpellBad ctermfg=0 ctermbg=1 cterm=undercurl +hi SpellCap ctermfg=0 ctermbg=2 cterm=undercurl +hi SpellRare ctermfg=0 ctermbg=none cterm=undercurl +hi SpellLocal ctermfg=0 ctermbg=5 cterm=undercurl + +hi DiffAdd ctermfg=0 ctermbg=2 +hi DiffChange ctermfg=0 ctermbg=4 +hi DiffDelete ctermfg=0 ctermbg=1 +hi DiffText ctermfg=0 ctermbg=4 + +hi Folded ctermbg=8 +hi FoldColumn ctermbg=8 + +hi Pmenu ctermfg=4 ctermbg=233 +hi PmenuSel ctermfg=4 ctermbg=8 +hi PmenuThumb ctermfg=8 ctermbg=8 +hi PmenuSbar ctermfg=0 ctermbg=0 +hi StatusLineNC ctermfg=8 ctermbg=NONE cterm=bold +hi StatusLine ctermfg=14 ctermbg=NONE cterm=NONE +hi MyStatuslineFilename ctermfg=4 ctermbg=NONE +hi MyStatuslineFiletype ctermfg=9 ctermbg=none cterm=italic + +hi MyStatuslineLineCol ctermfg=1 ctermbg=none cterm=none +hi MyStatuslineLinePerc ctermfg=2 ctermbg=none cterm=none +hi CursorLine ctermbg=8 cterm=NONE +hi CursorColumn ctermbg=8 cterm=NONE " ALE hi ALEWarning cterm=undercurl @@ -77,20 +77,20 @@ hi LspErrorText ctermfg=red ctermbg=none " Cursorline highlight augroup CursorLine - au! - au VimEnter,WinEnter,BufWinEnter * setlocal cursorline - au WinLeave * setlocal nocursorline + au! + au VimEnter,WinEnter,BufWinEnter * setlocal cursorline + au WinLeave * setlocal nocursorline augroup END " Files -hi Win ctermfg=white ctermbg=none cterm=none -hi Directory ctermfg=blue ctermbg=none cterm=bold -hi Link ctermfg=cyan ctermbg=none cterm=none -hi BrokenLink ctermfg=red ctermbg=none cterm=bold -hi Socket ctermfg=magenta ctermbg=none cterm=bold -hi Device ctermfg=red ctermbg=none cterm=bold -hi Fifo ctermfg=red ctermbg=none cterm=bold -" hi Executable ctermfg=0 ctermbg=1 cterm=bold +hi Win ctermfg=white ctermbg=none cterm=none +hi Directory ctermfg=blue ctermbg=none cterm=bold +hi Link ctermfg=cyan ctermbg=none cterm=none +hi BrokenLink ctermfg=red ctermbg=none cterm=bold +hi Socket ctermfg=magenta ctermbg=none cterm=bold +hi Device ctermfg=red ctermbg=none cterm=bold +hi Fifo ctermfg=red ctermbg=none cterm=bold +" hi Executable ctermfg=0 ctermbg=1 cterm=bold " Syntax @@ -108,4 +108,3 @@ hi GitGutterChange ctermbg=none ctermfg=3 cterm=bold hi GitGutterAdd ctermbg=none ctermfg=2 cterm=bold hi GitGutterDelete ctermbg=none ctermfg=1 cterm=bold hi GitGutterChangeDelete ctermbg=none ctermfg=5 cterm=bold - diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index f257337..14d604b 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -34,9 +34,22 @@ set mouse=a set splitright set splitbelow set noshowmode +set shortmess+=I color biual -highlight OverLength ctermbg=none ctermfg=14 cterm=underline +" Ignore files which vim doesn't use +set wildignore+=.git,.hg,.svn +set wildignore+=*.aux,*.out,*.toc +set wildignore+=*.o,*.obj,*.exe,*.dll,*.manifest,*.rbc,*.class +set wildignore+=*.ai,*.bmp,*.gif,*.ico,*.jpg,*.jpeg,*.png,*.psd,*.webp +set wildignore+=*.avi,*.divx,*.mp4,*.webm,*.mov,*.m2ts,*.mkv,*.vob,*.mpg,*.mpeg +set wildignore+=*.mp3,*.oga,*.ogg,*.wav,*.flac,*.opus +set wildignore+=*.eot,*.otf,*.ttf,*.woff +set wildignore+=*.doc,*.pdf,*.cbr,*.cbz +set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.kgb +set wildignore+=*.swp,.lock,.DS_Store,._* + +highlight OverLength cterm=underline match OverLength /\%81v.\+/ " Restore cursor position @@ -69,12 +82,12 @@ augroup langindentation autocmd Filetype sh setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 augroup END -" oh, gods - this is beautiful +" Automatically reload configs on save autocmd BufWritePost *Xresources,*Xdefaults !xrdb % autocmd BufWritePost *sxhkdrc !pkill -USR1 sxhkd -autocmd BufWritePost *picom.conf !pkill -USR1 picom +autocmd BufWritePost *picom.conf !pkill -USR1 picom -" Automatically deletes all trailing whitespace and newlines at end of file on save. +" Automatically deletes all trailing whitespace and newlines at end of file on save autocmd BufWritePre * %s/\s\+$//e autocmd BufWritepre * %s/\n\+\%$//e diff --git a/.config/nvim/plugins.vim b/.config/nvim/plugins.vim index 9cd4ff1..b55219e 100644 --- a/.config/nvim/plugins.vim +++ b/.config/nvim/plugins.vim @@ -13,9 +13,6 @@ call plug#begin('~/.config/nvim/bundle') " files management Plug '~/.fzf' Plug 'junegunn/fzf.vim' - Plug 'scrooloose/nerdtree' - Plug 'jistr/vim-nerdtree-tabs' - Plug 'vifm/vifm.vim' " linters/deoplete Plug 'dense-analysis/ale' @@ -23,9 +20,7 @@ call plug#begin('~/.config/nvim/bundle') Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' } Plug 'Shougo/deoplete-clangx' - " Plug 'deoplete-plugins/deoplete-jedi' Plug 'deoplete-plugins/deoplete-zsh' - " Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'} Plug 'prabirshrestha/async.vim' Plug 'prabirshrestha/asyncomplete.vim' Plug 'prabirshrestha/vim-lsp' @@ -53,13 +48,10 @@ call plug#begin('~/.config/nvim/bundle') Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } " git - Plug 'tpope/vim-fugitive' - Plug 'junegunn/gv.vim' Plug 'airblade/vim-gitgutter' " syntax Plug 'bfrg/vim-cpp-modern' - Plug 'udalov/kotlin-vim' Plug 'vim-python/python-syntax' Plug 'jelera/vim-javascript-syntax' call plug#end() @@ -72,7 +64,6 @@ let g:ale_sign_error = '' let g:lsp_signs_error = {'text': ''} let g:ale_sign_warning = '' let g:lsp_signs_warning = {'text': ''} -" let g:lsp_signs_error = {'', 'icon': '/path/to/some/icon'} " icons require GUI let g:lsp_signs_hint = {'text': ''} " icons require GUI let g:ale_linters = { @@ -84,7 +75,6 @@ let g:ale_linters = { \ 'sh': ['language_server', 'shellcheck', 'shell'], \ 'zsh': ['language_server', 'shellcheck', 'shell'], \ 'go': ['gofmt'], -\ 'kotlin': ['ktlint'], \} let g:ale_fixers = { \ '*': ['trim_whitespace', 'remove_trailing_lines'], @@ -120,16 +110,12 @@ let g:fzf_colors = \ 'spinner': ['fg', 'Label'], \ 'header': ['fg', 'Comment'] } -let g:fzf_layout = { 'down': '~40%' } +let g:fzf_layout = { 'down': '~50%' } let g:fzf_preview_window = 'right:60%' " gitgutter set updatetime=1000 -" NERDTree -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif - " emmet-vim let g:user_emmet_mode='a' let g:user_emmet_leader_key=',' @@ -169,8 +155,9 @@ if (executable('typescript-language-server')) \ 'whitelist': ['javascript', 'javascript.jsx', 'javascriptreact'] \ }) augroup END -endif + endif +" for C/C++ language server if (executable('ccls')) augroup LspCpp autocmd! @@ -184,8 +171,7 @@ if (executable('ccls')) augroup END endif -" for golang language server - +" for Go language server if executable('gopls') au User lsp_setup call lsp#register_server({ \ 'name': 'gopls', @@ -204,8 +190,8 @@ if executable('go-langserver') autocmd BufWritePre *.go LspDocumentFormatSync endif -let g:lsp_diagnostics_enabled = 1 -let g:lsp_signs_enabled = 1 +let g:lsp_diagnostics_enabled = 1 +let g:lsp_signs_enabled = 1 let g:lsp_diagnostics_echo_cursor = 1 let g:lsp_highlights_enabled = 0 let g:lsp_textprop_enabled = 0 @@ -216,7 +202,7 @@ let g:lsp_highlight_references_enabled = 1 let g:AutoPairs={'(':')', '[':']', '{':'}', "'":"'", '"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} "'<':'>', " LaTeX -let g:livepreview_previewer = 'mupdf' +let g:livepreview_previewer = 'zathura' " Enable "Rainbow Parentheses Improved" let g:rainbow_active = 1 @@ -230,5 +216,3 @@ augroup END " python syntax let g:python_highlight_all = 1 - - diff --git a/.config/nvim/statusline.vim b/.config/nvim/statusline.vim index 36cc6f6..27345cd 100644 --- a/.config/nvim/statusline.vim +++ b/.config/nvim/statusline.vim @@ -5,25 +5,25 @@ function! Mode(mode) " {{{ " normal mode if a:mode == 'n' - return ' normal ' + return '  ' " insert mode elseif a:mode == 'i' - return ' insert ' + return '  ' " replace mode elseif a:mode == 'R' - return ' replace ' + return '  ' " visual mode elseif a:mode == 'v' - return ' visual ' + return '  ' " visual block mode elseif a:mode == '' - return ' v-block ' + return '  ' " command mode elseif a:mode == 'c' - return ' command ' + return '  ' " terminal mode elseif a:mode == 't' - return ' terminal ' + return '  ' endif " Return empty string so as not to display anything in the statusline return ' ' @@ -34,11 +34,10 @@ endfunction function! SetModifiedSymbol(modified) " {{{ if a:modified == 1 hi MyStatuslineModifiedBody ctermbg=NONE cterm=NONE ctermfg=3 - return ' (+) ' else - hi MyStatuslineModifiedBody ctermbg=NONE cterm=bold ctermfg=7 - return ' ' + hi MyStatuslineModifiedBody ctermbg=NONE cterm=bold ctermfg=8 endif + return ' ' endfunction " }}} @@ -52,25 +51,16 @@ function! SetFiletype(filetype) " {{{ endfunction " }}} -set statusline=%#MyStatuslineSeparator#\ \ +set statusline=%#MyStatuslineSeparator#\ " set statusline+=%{Mode(mode())} -" filename -set statusline+=%#MyStatuslineSeparator#\ \ -set statusline+=%#MyStatuslineFilename#%t -set statusline+=%#MyStatuslineSeparator#\ \ -" Modified status -set statusline+=%#MyStatuslineModifiedBody#%{SetModifiedSymbol(&modified)}%#Reset# - -set statusline+=%= -set statusline+=%{FugitiveStatusline()} -set statusline+=%#MyStatuslineSeparator#\ \ +set statusline+=%#MyStatuslineSeparator#\ " set statusline+=%#MyStatuslineLineCol# set statusline+=%l,%c -set statusline+=%#MyStatuslineSeparator#\ \ -" set statusline+=%<%f\ %h%m%r%{FugitiveStatusline()}%=%-14.(%l,%c%V%)\ %P -set statusline+=%#MyStatuslineSeparator#\ \ + +set statusline+=%= set statusline+=\%#MyStatuslineFiletype#%{SetFiletype(&filetype)} - - - +set statusline+=%#MyStatuslineSeparator#\ \ " +set statusline+=%#MyStatuslineFilename#%t +set statusline+=%#MyStatuslineSeparator#\ \ " +set statusline+=%#MyStatuslineModifiedBody#%{SetModifiedSymbol(&modified)}%#Reset#