From 04eb5265601164931114d97ec05bf590fde33342 Mon Sep 17 00:00:00 2001 From: Wiktor Zykubek Date: Thu, 19 Mar 2020 16:25:43 +0100 Subject: [PATCH] Completly rebuild of neovim config --- botfiles/.bash_profile | 3 +- botfiles/.config/dconf/user | Bin 907 -> 907 bytes botfiles/.config/gtk-2.0/gtkfilechooser.ini | 8 +- botfiles/.config/gtk-3.0/bookmarks | 1 + botfiles/.config/homepage/style.css | 10 +- botfiles/.config/nvim/.netrwhist | 6 +- botfiles/.config/nvim/bindings.vim | 105 ++++++ botfiles/.config/nvim/colors/biual.vim | 106 ++++++ botfiles/.config/nvim/init.vim | 366 +------------------- botfiles/.config/nvim/plugins.vim | 210 +++++++++++ botfiles/.config/nvim/statusline.vim | 76 ++++ botfiles/.config/vifm/colors/biual.vifm | 70 ++-- botfiles/.config/vifm/vifmrc | 6 + botfiles/.profile | 3 +- botfiles/.shellrc | 7 + botfiles/.zprofile | 3 +- dotman | 8 +- 17 files changed, 584 insertions(+), 404 deletions(-) create mode 100644 botfiles/.config/gtk-3.0/bookmarks create mode 100644 botfiles/.config/nvim/bindings.vim create mode 100644 botfiles/.config/nvim/colors/biual.vim create mode 100644 botfiles/.config/nvim/plugins.vim create mode 100644 botfiles/.config/nvim/statusline.vim diff --git a/botfiles/.bash_profile b/botfiles/.bash_profile index 913865b..61f7d17 100644 --- a/botfiles/.bash_profile +++ b/botfiles/.bash_profile @@ -19,6 +19,7 @@ export TERMINAL="st" #~~~~~~ # PATH #~~~~~~ -export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin" +export NPM_PACKAGES="$HOME/.yarn/bin/" +export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin:$NPM_PACKAGES" export SCRD=$HOME/.scripts/ diff --git a/botfiles/.config/dconf/user b/botfiles/.config/dconf/user index 0dd448644f555b6becd0a846e97d5e1930d85dcf..25646546811d59911bc3e1c136b87b985380d48c 100644 GIT binary patch delta 201 zcmeBX?`GdHhcVET`QS`u1_lOMAi>X2#$W)XZGqTIP|Y1A4r22H#RGtJG!QS?<{bqR z2eG+;;u%1?1c<9?oF{5+7daG;t9hRI^gcH+euK)I62f>hn){G8HU Jurwn>5&(M6BX9r! delta 207 zcmeBX?`GdHhcVDfP|cm0fq_95NboY0F&F@8Yam{*%{vMt4q|fw#XW#@2oQTRADjsi z2eJ8q;u%1?6o{*4bDsf;mrj1m7|h5x*^x*}W~OFw22i@BvLIDA OIX|Z~7o>ubAqfB@k|dr0 diff --git a/botfiles/.config/gtk-2.0/gtkfilechooser.ini b/botfiles/.config/gtk-2.0/gtkfilechooser.ini index 0346f6c..24f2c76 100644 --- a/botfiles/.config/gtk-2.0/gtkfilechooser.ini +++ b/botfiles/.config/gtk-2.0/gtkfilechooser.ini @@ -2,10 +2,10 @@ LocationMode=path-bar ShowHidden=true ShowSizeColumn=true -GeometryX=263 -GeometryY=81 +GeometryX=540 +GeometryY=237 GeometryWidth=840 GeometryHeight=630 -SortColumn=modified -SortOrder=descending +SortColumn=name +SortOrder=ascending StartupMode=recent diff --git a/botfiles/.config/gtk-3.0/bookmarks b/botfiles/.config/gtk-3.0/bookmarks new file mode 100644 index 0000000..c7f2649 --- /dev/null +++ b/botfiles/.config/gtk-3.0/bookmarks @@ -0,0 +1 @@ +file:///home/samedamci/Pictures diff --git a/botfiles/.config/homepage/style.css b/botfiles/.config/homepage/style.css index 975da99..0e0d5f7 100644 --- a/botfiles/.config/homepage/style.css +++ b/botfiles/.config/homepage/style.css @@ -37,7 +37,7 @@ body { margin: 50px auto; display: grid; grid-gap: 10px; - grid-template-columns: auto auto auto auto; + grid-template-columns: auto auto auto auto; } .bmark { @@ -47,12 +47,14 @@ body { margin: 0 0 3px 3px; } -.bmark, .search-bar { +.bmark, +.search-bar { border: 1px solid var(--bru); } -.bmark:hover, .search-bar:hover { +.bmark:hover, +.search-bar:hover { border-color: var(--brf); color: var(--brf); - transition: .3s; + transition: 0.3s; } diff --git a/botfiles/.config/nvim/.netrwhist b/botfiles/.config/nvim/.netrwhist index 2b2f493..032f622 100644 --- a/botfiles/.config/nvim/.netrwhist +++ b/botfiles/.config/nvim/.netrwhist @@ -1,5 +1,7 @@ let g:netrw_dirhistmax =10 -let g:netrw_dirhistcnt =4 +let g:netrw_dirhistcnt =6 +let g:netrw_dirhist_6='/home/samedamci' +let g:netrw_dirhist_5='/home/samedamci/.scripts/rofi-keepassxc' let g:netrw_dirhist_4='/home/samedamci/.config/dunst' let g:netrw_dirhist_3='/home/samedamci/.config/ncmpcpp' let g:netrw_dirhist_2='/home/samedamci/.config/zsh' @@ -8,5 +10,3 @@ let g:netrw_dirhist_0='/home/samedamci/.config/autostart' let g:netrw_dirhist_9='/home/samedamci/.config/sxhkd' let g:netrw_dirhist_8='/home/samedamci/.conf' let g:netrw_dirhist_7='/home/samedamci/.config/bspwm' -let g:netrw_dirhist_6='/home/samedamci/.config/sxhkd' -let g:netrw_dirhist_5='/home/samedamci/.config/mpd' diff --git a/botfiles/.config/nvim/bindings.vim b/botfiles/.config/nvim/bindings.vim new file mode 100644 index 0000000..c99718f --- /dev/null +++ b/botfiles/.config/nvim/bindings.vim @@ -0,0 +1,105 @@ +"============== +" Key Bindings +"============== +" Leader key +let mapleader = ' ' + +" Show git commit list +map gv :GV + +" enable/disable deoplete +map d :call deoplete#toggle() + +" gitgutter maping +map gt :GitGutterToggle +nmap gn (GitGutterNextHunk) +nmap gN (GitGutterPrevHunk) +nmap gs (GitGutterStageHunk) +nmap gu (GitGutterUndoHunk) +nmap gp (GitGutterPreviewHunk) + +" Disable hlsearch +map :noh + +" Go to last change +map l :'. + +" Complete with +" inoremap pumvisible()?"\":"\" +" inoremap pumvisible()?"\":"\" + +" When line overflows, it will go +" one _visual_ line and not actual +map j gj +map k gk + +" fzf, fuzzy finder +map f :Files +map fg :GFiles + +let g:fzf_action = { + \ 'ctrl-t': 'tab split', + \ 'ctrl-x': 'split', + \ 'ctrl-v': 'vsplit' } + +" vifm +map r :Vifm + +" deletes all trailing whitespace +noremap c :%s/\s\+$//e + +" imap (fzf-complete-word) +" imap (fzf-complete-path) +" imap (fzf-complete-file-ag) +" imap (fzf-complete-line) + +map :NERDTreeToggle + +" SuperTab +let g:SuperTabMappingTabLiteral = '' +let g:SuperTabDefaultCompletionType = 'context' +let g:SuperTabContextDefaultCompletionType = '' + +" LaTeX +map l :LLPStartPreview + +" ALE - Asynchronous Lint Engine +map fw :FixWhitespace +map af :ALEFix +map an :ALENext +map aN :ALEPrevious +map ad :ALEDetail +map ag :ALEGoToDefinitionInSplit +map aG :ALEGoToDefinition + +" Tab Managment +map :tabnew +map :tabclose +nnoremap gt +nnoremap gT + +" Split Managment +nnoremap +nnoremap +nnoremap +nnoremap + +" Spell-check (English US and Polish) +map :setlocal spell! spelllang=en_us +map :setlocal spell! spelllang=pl + +" Sudo read-only file +cnoremap sudow w !sudo tee % >/dev/null + +" Open terminal +noremap :split term://zsh:resize 10 + +" Exit from terminal mode +tnoremap + +" UltiSnips +let g:UltiSnipsExpandTrigger='' +let g:UltiSnipsJumpForwardTrigger='' +let g:UltiSnipsJumpBackwardTrigger='' +let g:UltiSnipsListSnippets='' + diff --git a/botfiles/.config/nvim/colors/biual.vim b/botfiles/.config/nvim/colors/biual.vim new file mode 100644 index 0000000..cc82978 --- /dev/null +++ b/botfiles/.config/nvim/colors/biual.vim @@ -0,0 +1,106 @@ +" +" ██ +" ░██ +" █████ ██████ ░██ ██████ ██████ ██████ +" ██░░░██ ██░░░░██ ░██ ██░░░░██░░██░░█ ██░░░░ +" ░██ ░░ ░██ ░██ ░██░██ ░██ ░██ ░ ░░█████ +" ░██ ██░██ ░██ ░██░██ ░██ ░██ ░░░░░██ +" ░░█████ ░░██████ ███░░██████ ░███ ██████ +" ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░ + +if exists('syntax_on') + syntax reset +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=3 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 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 + + +" Cursorline highlight +augroup CursorLine + 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 + +" Syntax + +hi Comment ctermfg=10 +hi Constant ctermfg=3 cterm=none +hi Identifier ctermfg=180 +hi Statement ctermfg=13 cterm=italic +hi PreProc ctermfg=13 +hi Type ctermfg=4 cterm=bold +hi Special ctermfg=135 +" hi Error ctermfg=0 + +" githutter +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 + +" ALE +hi ALEWarning cterm=undercurl +hi ALEError cterm=undercurl +hi ALEWarningSign ctermbg=none ctermfg=3 cterm=bold +hi ALEErrorSign ctermbg=none ctermfg=1 cterm=bold + diff --git a/botfiles/.config/nvim/init.vim b/botfiles/.config/nvim/init.vim index 6f5b89f..b13bbea 100644 --- a/botfiles/.config/nvim/init.vim +++ b/botfiles/.config/nvim/init.vim @@ -1,74 +1,17 @@ -" _ -" _ __ ___ _____ _(_)_ __ ___ -" | '_ \ / _ \/ _ \ \ / / | '_ ` _ \ -" | | | | __/ (_) \ V /| | | | | | | -" |_| |_|\___|\___/ \_/ |_|_| |_| |_| " +" ██ +" ░░ +" ███████ █████ ██████ ██ ██ ██ ██████████ +" ░░██░░░██ ██░░░██ ██░░░░██░██ ░██░██░░██░░██░░██ +" ░██ ░██░███████░██ ░██░░██ ░██ ░██ ░██ ░██ ░██ +" ░██ ░██░██░░░░ ░██ ░██ ░░████ ░██ ░██ ░██ ░██ +" ███ ░██░░██████░░██████ ░░██ ░██ ███ ░██ ░██ +" ░░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░ ░░░ ░░ ░░ -"=========================== -" Load vim-plug for plugins -"=========================== -if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) - echo "Downloading junegunn/vim-plug to manage plugins..." - silent !mkdir -p ~/.config/nvim/autoload/ - silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim - autocmd VimEnter * PlugInstall -endif -call plug#begin('~/.config/nvim/bundle') - - " Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } - Plug '~/.fzf' - Plug 'junegunn/fzf.vim' - Plug 'scrooloose/nerdtree' - Plug 'jistr/vim-nerdtree-tabs' - Plug 'vifm/vifm.vim' - - Plug 'dense-analysis/ale' - - Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } - Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' } - Plug 'Shougo/deoplete-clangx' - " Plug 'https://github.com/Shougo/neco-vim' - " Plug 'https://github.com/Shougo/neoinclude.vim' - Plug 'deoplete-plugins/deoplete-jedi' - Plug 'deoplete-plugins/deoplete-zsh' - Plug 'deoplete-plugins/deoplete-go', { 'do': 'make'} - Plug 'ervandew/supertab' - - Plug 'SirVer/ultisnips' - Plug 'honza/vim-snippets' - - Plug 'mattn/emmet-vim' - - Plug 'airblade/vim-gitgutter' - Plug 'tpope/vim-fugitive' - - Plug '~/.config/nvim/bundle/vim-trailing-whitespace' - Plug 'tpope/vim-surround' - Plug 'tpope/vim-commentary' - Plug 'jiangmiao/auto-pairs' - - Plug 'itchyny/lightline.vim' - "Plug '~/.config/nvim/bundle/lightline-simple/' - - Plug 'sheerun/vim-polyglot' - Plug 'luochen1990/rainbow' - - Plug 'christoomey/vim-tmux-navigator' - Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } - - Plug 'tpope/vim-fugitive' - Plug 'junegunn/gv.vim' - - Plug 'matze/vim-move' - Plug 'reedes/vim-pencil' - - " Syntax - Plug 'bfrg/vim-cpp-modern' - Plug 'jelera/vim-javascript-syntax' - Plug 'udalov/kotlin-vim' -call plug#end() +source $HOME/.config/nvim/statusline.vim +source $HOME/.config/nvim/plugins.vim +source $HOME/.config/nvim/bindings.vim "============= " Basic stuff @@ -91,6 +34,8 @@ set background=light set mouse=a set splitright set splitbelow +set noshowmode +color biual " Restore cursor position function! ResCur() @@ -104,195 +49,10 @@ augroup resCur autocmd BufWinEnter * call ResCur() augroup END -"============= -" Colorscheme -"============= -hi LineNr ctermfg=6 cterm=NONE -hi CursorLineNr ctermfg=5 cterm=bold -hi ColorColumn ctermbg=0 ctermfg=1 cterm=undercurl -hi SignColumn ctermfg=7 -hi VertSplit ctermbg=8 ctermfg=0 - -hi Comment ctermfg=4 -hi String ctermfg=1 - -hi Visual ctermbg=8 -hi Search ctermbg=8 cterm=bold,reverse -hi MatchParen ctermbg=0 ctermfg=3 cterm=bold -hi Statement ctermfg=3 - -hi ErrorMsg ctermbg=0 ctermfg=1 -hi Error ctermbg=1 ctermfg=0 cterm=undercurl - -hi SpellBad ctermbg=1 ctermfg=0 cterm=undercurl -hi SpellCap ctermbg=2 ctermfg=0 cterm=undercurl -hi SpellRare ctermbg=3 ctermfg=0 cterm=undercurl -hi SpellLocal ctermbg=5 ctermfg=0 cterm=undercurl - -hi DiffAdd ctermbg=2 ctermfg=0 -hi DiffChange ctermbg=4 ctermfg=0 -hi DiffDelete ctermbg=1 ctermfg=0 -hi DiffText ctermbg=4 ctermfg=0 - -hi Folded ctermbg=8 -hi FoldColumn ctermbg=8 - -hi Pmenu ctermbg=0 ctermfg=4 -hi PmenuSel ctermbg=8 ctermfg=4 -hi PmenuThumb ctermbg=8 ctermfg=8 -hi PmenuSbar ctermbg=0 ctermfg=0 - -" Highlight current line -hi CursorLine ctermbg=8 cterm=NONE -hi CursorColumn ctermbg=8 cterm=NONE -augroup CursorLine - au! - "au VimEnter,WinEnter,BufWinEnter * setlocal cursorcolumn - au VimEnter,WinEnter,BufWinEnter * setlocal cursorline - au WinLeave * setlocal nocursorline -augroup END - -" Statusline -set laststatus=2 -hi StatusLine ctermbg=8 ctermfg=blue cterm=NONE -hi StatusLineNC ctermbg=8 ctermfg=blue cterm=NONE -hi User1 ctermbg=NONE ctermfg=blue -hi User2 ctermbg=NONE ctermfg=blue -hi User3 ctermbg=NONE ctermfg=blue -hi User4 ctermbg=8 ctermfg=blue -set statusline+=\ %y " File type -set statusline+=\ %1*\ " Padding & switch colour -set statusline+=%t\ " File name -set statusline+=%M " Modified flag -set statusline+=\ %2*\ " Padding & switch colour -set statusline+=%= " Switch to right-side -set statusline+=\ %3*\ " Padding & switch colour -set statusline+=%p%% " Current line -set statusline+=\ %4*\ " Padding & switch colour -set statusline+=%{&fileencoding?&fileencoding:&encoding}\ " File coding - -" Lightline - statusline -hi StatusLine ctermbg=8 ctermfg=4 cterm=NONE -hi StatusLineNC ctermbg=8 ctermfg=4 cterm=NONE -set noshowmode - -let g:lightline = { - \ 'colorscheme': 'seoul256', - \ 'active': { - \ 'left': [ [ 'mode' ], - \ [ 'readonly', 'filename', 'gitbranch' ], - \ [ 'modified' ] ], - \ 'right': [ [ 'filetype', 'fileencoding' ], - \ [ 'percent' ] ] - \ }, - \ 'component_function': { - \ 'gitbranch': 'fugitive#head' - \ }, - \ } - -"================ -" Plugin configs -"================ -let g:move_key_modifier = 'C' - -" ALE - Asynchronous Lint Engine -hi ALEWarning cterm=undercurl -hi ALEError cterm=undercurl -hi ALEWarningSign ctermbg=0 ctermfg=3 cterm=bold -hi ALEErrorSign ctermbg=0 ctermfg=1 cterm=bold - -let g:ale_linters = { -\ 'c': ['ccls', 'clang'], -\ 'cpp': ['ccls', 'clang'], -\ 'javascript': ['eslint'], -\ 'php': ['php'], -\ 'python': ['pyls', 'flake8'], -\ 'sh': ['language_server', 'shellcheck', 'shell'], -\ 'zsh': ['language_server', 'shellcheck', 'shell'], -\ 'go': ['gofmt'], -\ 'kotlin': ['ktlint'], -\} -let g:ale_fixers = { -\ '*': ['trim_whitespace', 'remove_trailing_lines'], -\ 'c': ['clang-format'], -\ 'cpp': ['clang-format'], -\ 'css': ['prettier'], -\ 'go': ['gofmt'], -\ 'html': ['prettier'], -\ 'javascript': ['prettier'], -\ 'json': ['prettier'], -\ 'php': ['prettier'], -\ 'python': ['black'], -\ 'scss': ['prettier'], -\ 'yaml': ['prettier'], -\} - -" fzf colors -let g:fzf_colors = -\ { 'fg': ['fg', 'Normal'], - \ 'bg': ['bg', 'Normal'], - \ 'hl': ['fg', 'Comment'], - \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], - \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], - \ 'hl+': ['fg', 'Statement'], - \ 'info': ['fg', 'PreProc'], - \ 'border': ['fg', 'Ignore'], - \ 'prompt': ['fg', 'Conditional'], - \ 'pointer': ['fg', 'Exception'], - \ 'marker': ['fg', 'Keyword'], - \ 'spinner': ['fg', 'Label'], - \ 'header': ['fg', 'Comment'] } - -" Default fzf layout -let g:fzf_layout = { 'down': '~70%' } - -" Python paths, needed for virtualenvs +"Python paths, needed for virtualenvs let g:python3_host_prog = '/usr/bin/python3' let g:python_host_prog = '/usr/bin/python2' -" Go - $ go get -u github.com/stamblerre/gocode -let g:deoplete#sources#go#gocode_binary = "$HOME/go/bin/gocode" - -" LaTeX -let g:livepreview_previewer = 'zathura' - -" Enable "Rainbow Parentheses Improved" -let g:rainbow_active = 1 - -" Whitspace -let g:extra_whitespace_ignored_filetypes = [ 'help', 'vim-plug' ] - -" GitGutter -set updatetime=1000 -hi GitGutterChange ctermbg=0 ctermfg=3 cterm=bold -hi GitGutterAdd ctermbg=0 ctermfg=2 cterm=bold -hi GitGutterDelete ctermbg=0 ctermfg=1 cterm=bold -hi GitGutterChangeDelete ctermbg=0 ctermfg=5 cterm=bold - -" Open Nerd Tree if no files were specified -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif - -" Emmet settings -let g:user_emmet_mode='a' -let g:user_emmet_leader_key=',' -let g:user_emmet_install_global = 0 -autocmd FileType html,css EmmetInstall - -" Deoplete - autocompletion -let g:deoplete#enable_at_startup = 1 -set completeopt-=preview - -call deoplete#custom#source('ultisnips', 'rank', 1000) - -" AutoPairs -let g:AutoPairs={'(':')', '[':']', '{':'}', "'":"'", '"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} "'<':'>', - -"On startup, go to the last changes -"au BufEnter * :'. - -" If you want :UltiSnipsEdit to split your window. -" let g:UltiSnipsEditSplit="vertical" "=================== " Language-specific @@ -309,103 +69,5 @@ augroup langindentation autocmd Filetype yaml setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2 augroup END -"============== -" Key Bindings -"============== -" Leader key -let mapleader = ' ' - -" enable/disable deoplete -map d :call deoplete#toggle() - -" gitgutter maping -map gt :GitGutterToggle -nmap gn (GitGutterNextHunk) -nmap gN (GitGutterPrevHunk) -nmap gs (GitGutterStageHunk) -nmap gu (GitGutterUndoHunk) -nmap gp (GitGutterPreviewHunk) - -" Disable hlsearch -map :noh - -" Go to last change -map l :'. - -" Complete with -" inoremap pumvisible()?"\":"\" -" inoremap pumvisible()?"\":"\" - -" When line overflows, it will go -" one _visual_ line and not actual -map j gj -map k gk - -" fzf, fuzzy finder -nnoremap :Files -nnoremap :GFiles -let g:fzf_action = { - \ 'ctrl-t': 'tab split', - \ 'ctrl-x': 'split', - \ 'ctrl-v': 'vsplit' } - -" vifm -nnoremap :Vifm - -" imap (fzf-complete-word) -" imap (fzf-complete-path) -" imap (fzf-complete-file-ag) -" imap (fzf-complete-line) - -map :NERDTreeToggle - -" SuperTab -let g:SuperTabMappingTabLiteral = '' -let g:SuperTabDefaultCompletionType = 'context' -let g:SuperTabContextDefaultCompletionType = '' - -" LaTeX -map l :LLPStartPreview - -" ALE - Asynchronous Lint Engine -map fw :FixWhitespace -map af :ALEFix -map an :ALENext -map aN :ALEPrevious -map ad :ALEDetail -map ag :ALEGoToDefinitionInSplit -map aG :ALEGoToDefinition - -" Tab Managment -map :tabnew -map :tabclose -nnoremap gt -nnoremap gT - -" Split Managment -nnoremap -nnoremap -nnoremap -nnoremap - -" Spell-check (English US and Polish) -map :setlocal spell! spelllang=en_us -map :setlocal spell! spelllang=pl - -" Sudo read-only file -cnoremap sudow w !sudo tee % >/dev/null - -" Open terminal -" map :vsplit term://zsh - -" Exit from terminal mode -tnoremap - -" UltiSnips -let g:UltiSnipsExpandTrigger='' -let g:UltiSnipsJumpForwardTrigger='' -let g:UltiSnipsJumpBackwardTrigger='' -let g:UltiSnipsListSnippets='' - "==Encoding== scriptencoding utf-8 diff --git a/botfiles/.config/nvim/plugins.vim b/botfiles/.config/nvim/plugins.vim new file mode 100644 index 0000000..f03f6f6 --- /dev/null +++ b/botfiles/.config/nvim/plugins.vim @@ -0,0 +1,210 @@ +"========= +" Plugins +"========= +if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) + echo "Downloading junegunn/vim-plug to manage plugins..." + silent !mkdir -p ~/.config/nvim/autoload/ + silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim + autocmd VimEnter * PlugInstall +endif + +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' + + 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 'wokalski/autocomplete-flow' + " Plug 'Shougo/neosnippet' + " Plug 'Shougo/neosnippet-snippets' + Plug 'prabirshrestha/async.vim' + Plug 'prabirshrestha/asyncomplete.vim' + Plug 'prabirshrestha/vim-lsp' + Plug 'prabirshrestha/asyncomplete-lsp.vim' + + Plug 'lighttiger2505/deoplete-vim-lsp' + Plug 'ryanolsonx/vim-lsp-javascript' + + Plug 'ervandew/supertab' + Plug 'SirVer/ultisnips' + Plug 'honza/vim-snippets' + + Plug 'mattn/emmet-vim' + + + Plug 'tpope/vim-surround' + Plug 'tpope/vim-commentary' + Plug 'jiangmiao/auto-pairs' + + Plug 'sheerun/vim-polyglot' + Plug 'luochen1990/rainbow' + + Plug 'matze/vim-move' + Plug 'reedes/vim-pencil' + Plug 'christoomey/vim-tmux-navigator' + 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() + +"======== +" Config +"======== +" vim-move +let g:move_key_modifier = 'C' + +" ALE +let g:ale_linters = { +\ 'c': ['ccls', 'clang'], +\ 'cpp': ['ccls', 'clang'], +\ 'javascript': ['eslint'], +\ 'php': ['php'], +\ 'python': ['pyls', 'flake8'], +\ 'sh': ['language_server', 'shellcheck', 'shell'], +\ 'zsh': ['language_server', 'shellcheck', 'shell'], +\ 'go': ['gofmt'], +\ 'kotlin': ['ktlint'], +\} +let g:ale_fixers = { +\ '*': ['trim_whitespace', 'remove_trailing_lines'], +\ 'c': ['clang-format'], +\ 'cpp': ['clang-format'], +\ 'css': ['prettier'], +\ 'go': ['gofmt'], +\ 'html': ['prettier'], +\ 'javascript': ['prettier'], +\ 'json': ['prettier'], +\ 'php': ['prettier'], +\ 'python': ['black'], +\ 'scss': ['prettier'], +\ 'yaml': ['prettier'], +\} + +" fzf +let g:fzf_colors = +\ { 'fg': ['fg', 'Normal'], + \ 'bg': ['bg', 'Normal'], + \ 'hl': ['fg', 'Comment'], + \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], + \ 'hl+': ['fg', 'Statement'], + \ 'info': ['fg', 'PreProc'], + \ 'border': ['fg', 'Ignore'], + \ 'prompt': ['fg', 'Conditional'], + \ 'pointer': ['fg', 'Exception'], + \ 'marker': ['fg', 'Keyword'], + \ 'spinner': ['fg', 'Label'], + \ 'header': ['fg', 'Comment'] } + +let g:fzf_layout = { 'down': '~20%' } + + +" 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=',' +let g:user_emmet_install_global = 0 +autocmd FileType html,css EmmetInstall + +" deoplete +let g:deoplete#enable_at_startup = 1 +let g:deoplete#enable_ignore_case = 1 +set completeopt-=preview + +call deoplete#custom#source('ultisnips', 'rank', 1000) +" call deoplete#custom#source('zsh', 'filetypes', ['sh', 'zsh']) +call deoplete#custom#source('zsh', 'filetypes', ['sh', 'zsh']) +" call deoplete#custom#source('ale', 'rank', 1000) +" call deoplete#custom#source('autocomplete-flow', 'rank', 1000) +" call deoplete#custom#source('autocomplete-flow') +" call deoplete#custom#option('auto_complete_delay', 100) +call deoplete#custom#option('smart_case', v:false) + +let g:deoplete#sources#go#gocode_binary = "$HOME/go/bin/gocode" + +" For python language server +if (executable('pyls')) + " let s:pyls_path = fnamemodify(g:python_host_prog, ':h') . '/'. 'pyls' + augroup LspPython + autocmd! + autocmd User lsp_setup call lsp#register_server({ + \ 'name': 'pyls', + \ 'cmd': {server_info->['pyls']}, + \ 'whitelist': ['python'] + \ }) + augroup END +endif + +" for JS language server +if (executable('typescript-language-server')) + augroup LspJavaScript + autocmd! + autocmd User lsp_setup call lsp#register_server({ + \ 'name': 'js-ls', + \ 'cmd': {server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']}, + \ 'whitelist': ['javascript', 'javascript.jsx', 'javascriptreact'] + \ }) + augroup END +endif + +if (executable('ccls')) + augroup LspC* + autocmd! + autocmd User lsp_setup call lsp#register_server({ + \ 'name': 'ccls', + \ 'cmd': {server_info->['ccls']}, + \ 'root_uri': {server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'compile_commands.json'))}, + \ 'initialization_options': {}, + \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp', 'cc'], + \ }) + augroup END +endif + + +" autopairs +let g:AutoPairs={'(':')', '[':']', '{':'}', "'":"'", '"':'"', "`":"`", '```':'```', '"""':'"""', "'''":"'''"} "'<':'>', + +" LaTeX +let g:livepreview_previewer = 'mupdf' + +" Enable "Rainbow Parentheses Improved" +let g:rainbow_active = 1 + +" pencil +augroup pencil + autocmd! + autocmd FileType markdown call pencil#init({'wrap': 'soft', 'autoformat': 1}) + autocmd FileType tex call pencil#init({'wrap': 'soft', 'autoformat': 1}) +augroup END + +" python syntax +let g:python_highlight_all = 1 + + diff --git a/botfiles/.config/nvim/statusline.vim b/botfiles/.config/nvim/statusline.vim new file mode 100644 index 0000000..36cc6f6 --- /dev/null +++ b/botfiles/.config/nvim/statusline.vim @@ -0,0 +1,76 @@ +"============ +" Statusline +"============ + +function! Mode(mode) " {{{ + " normal mode + if a:mode == 'n' + return ' normal ' + " insert mode + elseif a:mode == 'i' + return ' insert ' + " replace mode + elseif a:mode == 'R' + return ' replace ' + " visual mode + elseif a:mode == 'v' + return ' visual ' + " visual block mode + elseif a:mode == '' + return ' v-block ' + " command mode + elseif a:mode == 'c' + return ' command ' + " terminal mode + elseif a:mode == 't' + return ' terminal ' + endif + " Return empty string so as not to display anything in the statusline + return ' ' +endfunction +" }}} + +" modification mark +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 ' ' + endif +endfunction +" }}} + +" filetype +function! SetFiletype(filetype) " {{{ + if a:filetype == '' + return '-' + else + return a:filetype + endif +endfunction +" }}} + +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+=%#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+=\%#MyStatuslineFiletype#%{SetFiletype(&filetype)} + + + diff --git a/botfiles/.config/vifm/colors/biual.vifm b/botfiles/.config/vifm/colors/biual.vifm index 088adcf..b0aeb6b 100644 --- a/botfiles/.config/vifm/colors/biual.vifm +++ b/botfiles/.config/vifm/colors/biual.vifm @@ -1,41 +1,41 @@ -" -" ██ -" ░██ +" +" ██ +" ░██ " █████ ██████ ░██ ██████ ██████ ██████ -" ██░░░██ ██░░░░██ ░██ ██░░░░██░░██░░█ ██░░░░ -" ░██ ░░ ░██ ░██ ░██░██ ░██ ░██ ░ ░░█████ +" ██░░░██ ██░░░░██ ░██ ██░░░░██░░██░░█ ██░░░░ +" ░██ ░░ ░██ ░██ ░██░██ ░██ ░██ ░ ░░█████ " ░██ ██░██ ░██ ░██░██ ░██ ░██ ░░░░░██ -" ░░█████ ░░██████ ███░░██████ ░███ ██████ -" ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░ +" ░░█████ ░░██████ ███░░██████ ░███ ██████ +" ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░ -highlight clear +hi clear -highlight Win ctermfg=white ctermbg=none cterm=none -highlight Directory ctermfg=blue ctermbg=default cterm=bold -highlight Link ctermfg=cyan ctermbg=default cterm=none -highlight BrokenLink ctermfg=red ctermbg=default cterm=bold -highlight Socket ctermfg=magenta ctermbg=default cterm=bold -highlight Device ctermfg=red ctermbg=default cterm=bold -highlight Fifo ctermfg=red ctermbg=default cterm=bold -highlight Executable ctermfg=green ctermbg=default cterm=bold -highlight Selected ctermfg=black ctermbg=8 cterm=bold -highlight CurrLine ctermfg=8 ctermbg=white cterm=bold,reverse -highlight TopLine ctermfg=none ctermbg=none cterm=none -highlight OtherLine ctermfg=7 ctermbg=none -highlight TopLineSel ctermfg=white ctermbg=none cterm=bold -highlight StatusLine ctermfg=7 ctermbg=234 cterm=none -highlight WildMenu ctermfg=4 ctermbg=black cterm=reverse -highlight CmdLine ctermfg=7 ctermbg=233 cterm=none -highlight ErrorMsg ctermfg=red ctermbg=233 cterm=none -highlight Border ctermfg=black ctermbg=none cterm=none -highlight JobLine ctermfg=black ctermbg=white cterm=none,reverse -highlight SuggestBox ctermfg=8 ctermbg=233 cterm=none -highlight CmpMismatch ctermfg=white ctermbg=red cterm=bold -highlight AuxWin ctermfg=default ctermbg=default cterm=none,underline,reverse,standout,italic -highlight TabLine ctermfg=9 ctermbg=0 cterm=none -highlight TabLineSel ctermfg=default ctermbg=default cterm=none,reverse +hi Win ctermfg=white ctermbg=none cterm=none +hi Directory ctermfg=blue ctermbg=default cterm=bold +hi Link ctermfg=cyan ctermbg=default cterm=none +hi BrokenLink ctermfg=red ctermbg=default cterm=bold +hi Socket ctermfg=magenta ctermbg=default cterm=bold +hi Device ctermfg=red ctermbg=default cterm=bold +hi Fifo ctermfg=red ctermbg=default cterm=bold +hi Executable ctermfg=green ctermbg=default cterm=bold +hi Selected ctermfg=black ctermbg=8 cterm=bold +hi CurrLine ctermfg=8 ctermbg=white cterm=bold,reverse +hi TopLine ctermfg=none ctermbg=none cterm=none +hi OtherLine ctermfg=7 ctermbg=none +hi TopLineSel ctermfg=white ctermbg=none cterm=bold +hi StatusLine ctermfg=4 ctermbg=none cterm=none +hi WildMenu ctermfg=4 ctermbg=black cterm=reverse +hi CmdLine ctermfg=7 ctermbg=none cterm=none +hi ErrorMsg ctermfg=red ctermbg=233 cterm=none +hi Border ctermfg=black ctermbg=none cterm=none +hi JobLine ctermfg=black ctermbg=white cterm=none,reverse +hi SuggestBox ctermfg=8 ctermbg=233 cterm=none +hi CmpMismatch ctermfg=white ctermbg=red cterm=bold +hi AuxWin ctermfg=default ctermbg=default cterm=none,underline,reverse,standout,italic +hi TabLine ctermfg=9 ctermbg=0 cterm=none +hi TabLineSel ctermfg=default ctermbg=default cterm=none,reverse -highlight /^.*\.(mp3|ogg|oga|flac|m4a)$/ ctermfg=magenta -highlight /^.*\.(jpg|jpeg|png|gif|tiff|webp|bmp|svg|svgz)$/ ctermfg=green -highlight /^.*\.(zip|gz|bz2|xz|tar|tgz|tbz2|7z|rar|iso|rpm|deb)$/ ctermfg=red +hi /^.*\.(mp3|ogg|oga|flac|m4a)$/ ctermfg=magenta +hi /^.*\.(jpg|jpeg|png|gif|tiff|webp|bmp|svg|svgz)$/ ctermfg=green +hi /^.*\.(zip|gz|bz2|xz|tar|tgz|tbz2|7z|rar|iso|rpm|deb)$/ ctermfg=red diff --git a/botfiles/.config/vifm/vifmrc b/botfiles/.config/vifm/vifmrc index eda9871..bfb6903 100644 --- a/botfiles/.config/vifm/vifmrc +++ b/botfiles/.config/vifm/vifmrc @@ -47,6 +47,12 @@ vnoremap w :viewgv nnoremap cc cw nnoremap I za +nnoremap +nnoremap +nnoremap +nnoremap + + " ------------------------------------------------------------------------------ " :com[mand][!] command_name action diff --git a/botfiles/.profile b/botfiles/.profile index 913865b..61f7d17 100644 --- a/botfiles/.profile +++ b/botfiles/.profile @@ -19,6 +19,7 @@ export TERMINAL="st" #~~~~~~ # PATH #~~~~~~ -export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin" +export NPM_PACKAGES="$HOME/.yarn/bin/" +export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin:$NPM_PACKAGES" export SCRD=$HOME/.scripts/ diff --git a/botfiles/.shellrc b/botfiles/.shellrc index b0e9017..18016f5 100644 --- a/botfiles/.shellrc +++ b/botfiles/.shellrc @@ -22,6 +22,12 @@ alias vi='nvim' alias vim='nvim' alias suvi='sudo -E nvim' +# ls / tree +alias l='ls -l' +alias la='ls -a' +alias ll='ls -al' +alias tr='tree -L 2' + # package managers alias owo='yay --editmenu --nodiffmenu --save' alias uwu="yay -Slq | fzf -m --preview 'yay -Si {1}' | yay -S -" @@ -62,6 +68,7 @@ alias ascii='figlet' alias mirrors='sudo reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist' alias copy='xclip -selection clipboard' alias battery='upower -i /org/freedesktop/UPower/devices/battery_BAT0' +alias c256='(x=`tput op` y=`printf %76s`;for i in {0..256};do o=00$i;echo -e ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${y// /=}$x;done)' #~~~~~~~~~~~~~~~~~ # Commands Colors diff --git a/botfiles/.zprofile b/botfiles/.zprofile index 913865b..61f7d17 100644 --- a/botfiles/.zprofile +++ b/botfiles/.zprofile @@ -19,6 +19,7 @@ export TERMINAL="st" #~~~~~~ # PATH #~~~~~~ -export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin" +export NPM_PACKAGES="$HOME/.yarn/bin/" +export PATH="$PATH:$HOME/Dotfiles:$HOME/.local/bin:$NPM_PACKAGES" export SCRD=$HOME/.scripts/ diff --git a/dotman b/dotman index a18ecff..1ea7154 100755 --- a/dotman +++ b/dotman @@ -28,10 +28,12 @@ install_packages() { sudo reflector --latest 200 --protocol http --protocol https --sort rate --save /etc/pacman.d/mirrorlist - yay -S --noconfirm --needed neovim qutebrowser telegram-desktop minecraft-launcher dunst bspwm sxhkd htop mpd ncmpcpp picom ranger rofi transmission-cli vlc zsh youtube-dl grc curl wget xclip figlet w3m xorg-server xorg-xinit ttf-font-awesome ttf-dejavu vifm feh xorg-xsetroot lxappearance python-pip alsa-utils tmux networkmanager maim fzf exfat-utils fuse2 udiskie udisks2 imagemagick i3lock-color man checkupdates+aur pacman-contrib polybar ccls clang eslint flake8 shellcheck clang-format-linter-git prettier python-black github-cli ncdu mpc neomutt bc cli-visualizer clipmenu gradle ktlint rofi-calc + yay -S --noconfirm --needed neovim qutebrowser telegram-desktop minecraft-launcher dunst bspwm sxhkd htop mpd ncmpcpp picom ranger rofi transmission-cli vlc zsh youtube-dl grc curl wget xclip figlet w3m xorg-server xorg-xinit ttf-font-awesome ttf-dejavu vifm feh xorg-xsetroot lxappearance python-pip alsa-utils tmux networkmanager maim fzf exfat-utils fuse2 udiskie udisks2 imagemagick i3lock-color man checkupdates+aur pacman-contrib polybar ccls clang eslint flake8 shellcheck clang-format-linter-git prettier python-black github-cli ncdu mpc neomutt bc cli-visualizer clipmenu gradle ktlint rofi-calc yarn + + pip3 install --user -U pynvim msgpack grip virtualenv virtualenvwrapper pipx + + yarn global add typescript typescript-language-server nvm - pip3 install --user -U pynvim msgpack - sudo pip install -U grip } install_st() {