Completly rebuild of neovim config

This commit is contained in:
Wiktor Zykubek 2020-03-19 16:25:43 +01:00
parent cd618b6cce
commit 04eb526560
17 changed files with 584 additions and 404 deletions

View File

@ -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/

Binary file not shown.

View File

@ -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

View File

@ -0,0 +1 @@
file:///home/samedamci/Pictures

View File

@ -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;
}

View File

@ -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'

View File

@ -0,0 +1,105 @@
"==============
" Key Bindings
"==============
" Leader key
let mapleader = ' '
" Show git commit list
map <Leader>gv :GV<CR>
" enable/disable deoplete
map <Leader>d :call deoplete#toggle()<CR>
" gitgutter maping
map <Leader>gt :GitGutterToggle<CR>
nmap gn <Plug>(GitGutterNextHunk)
nmap gN <Plug>(GitGutterPrevHunk)
nmap gs <Plug>(GitGutterStageHunk)
nmap gu <Plug>(GitGutterUndoHunk)
nmap gp <Plug>(GitGutterPreviewHunk)
" Disable hlsearch
map <C-s> :noh<CR>
" Go to last change
map <Leader>l :'.<CR>
" Complete with <TAB>
" inoremap <expr> <silent> <Tab> pumvisible()?"\<C-n>":"\<TAB>"
" inoremap <expr> <silent> <S-TAB> pumvisible()?"\<C-p>":"\<S-TAB>"
" When line overflows, it will go
" one _visual_ line and not actual
map j gj
map k gk
" fzf, fuzzy finder
map <Leader>f :Files<CR>
map <Leader>fg :GFiles<CR>
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
" vifm
map <Leader>r :Vifm<CR>
" deletes all trailing whitespace
noremap <leader>c :%s/\s\+$//e<cr>
" imap <c-x><c-k> <plug>(fzf-complete-word)
" imap <c-x><c-f> <plug>(fzf-complete-path)
" imap <c-x><c-j> <plug>(fzf-complete-file-ag)
" imap <c-x><c-l> <plug>(fzf-complete-line)
map <C-n> :NERDTreeToggle<CR>
" SuperTab
let g:SuperTabMappingTabLiteral = '<a-tab>'
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabContextDefaultCompletionType = '<c-n>'
" LaTeX
map <Leader>l :LLPStartPreview<CR>
" ALE - Asynchronous Lint Engine
map fw :FixWhitespace<CR>
map <Leader>af :ALEFix<CR>
map <Leader>an :ALENext<CR>
map <Leader>aN :ALEPrevious<CR>
map <Leader>ad :ALEDetail<CR>
map <Leader>ag :ALEGoToDefinitionInSplit<CR>
map <Leader>aG :ALEGoToDefinition<CR>
" Tab Managment
map <S-o> :tabnew<CR>
map <S-d> :tabclose<CR>
nnoremap <S-j> gt
nnoremap <S-k> gT
" Split Managment
nnoremap <C-A-j> <C-w><C-j>
nnoremap <C-A-k> <C-w><C-k>
nnoremap <C-A-l> <C-w><C-l>
nnoremap <C-A-h> <C-w><C-h>
" Spell-check (English US and Polish)
map <F6> :setlocal spell! spelllang=en_us<CR>
map <F7> :setlocal spell! spelllang=pl<CR>
" Sudo read-only file
cnoremap sudow w !sudo tee % >/dev/null
" Open terminal
noremap <C-A-t> :split term://zsh<cr>:resize 10<cr>
" Exit from terminal mode
tnoremap <C-e> <C-\><C-n>
" UltiSnips
let g:UltiSnipsExpandTrigger='<C-z>'
let g:UltiSnipsJumpForwardTrigger='<C-s>'
let g:UltiSnipsJumpBackwardTrigger='<C-g>'
let g:UltiSnipsListSnippets='<C-p>'

View File

@ -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

View File

@ -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 <Leader>d :call deoplete#toggle()<CR>
" gitgutter maping
map <Leader>gt :GitGutterToggle<CR>
nmap gn <Plug>(GitGutterNextHunk)
nmap gN <Plug>(GitGutterPrevHunk)
nmap gs <Plug>(GitGutterStageHunk)
nmap gu <Plug>(GitGutterUndoHunk)
nmap gp <Plug>(GitGutterPreviewHunk)
" Disable hlsearch
map <C-s> :noh<CR>
" Go to last change
map <Leader>l :'.<CR>
" Complete with <TAB>
" inoremap <expr> <silent> <Tab> pumvisible()?"\<C-n>":"\<TAB>"
" inoremap <expr> <silent> <S-TAB> pumvisible()?"\<C-p>":"\<S-TAB>"
" When line overflows, it will go
" one _visual_ line and not actual
map j gj
map k gk
" fzf, fuzzy finder
nnoremap <C-f> :Files<CR>
nnoremap <C-g> :GFiles<CR>
let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-x': 'split',
\ 'ctrl-v': 'vsplit' }
" vifm
nnoremap <C-r> :Vifm<CR>
" imap <c-x><c-k> <plug>(fzf-complete-word)
" imap <c-x><c-f> <plug>(fzf-complete-path)
" imap <c-x><c-j> <plug>(fzf-complete-file-ag)
" imap <c-x><c-l> <plug>(fzf-complete-line)
map <C-n> :NERDTreeToggle<CR>
" SuperTab
let g:SuperTabMappingTabLiteral = '<a-tab>'
let g:SuperTabDefaultCompletionType = 'context'
let g:SuperTabContextDefaultCompletionType = '<c-n>'
" LaTeX
map <Leader>l :LLPStartPreview<CR>
" ALE - Asynchronous Lint Engine
map fw :FixWhitespace<CR>
map <Leader>af :ALEFix<CR>
map <Leader>an :ALENext<CR>
map <Leader>aN :ALEPrevious<CR>
map <Leader>ad :ALEDetail<CR>
map <Leader>ag :ALEGoToDefinitionInSplit<CR>
map <Leader>aG :ALEGoToDefinition<CR>
" Tab Managment
map <S-o> :tabnew<CR>
map <S-d> :tabclose<CR>
nnoremap <S-j> gt
nnoremap <S-k> gT
" Split Managment
nnoremap <C-A-j> <C-w><C-j>
nnoremap <C-A-k> <C-w><C-k>
nnoremap <C-A-l> <C-w><C-l>
nnoremap <C-A-h> <C-w><C-h>
" Spell-check (English US and Polish)
map <F6> :setlocal spell! spelllang=en_us<CR>
map <F7> :setlocal spell! spelllang=pl<CR>
" Sudo read-only file
cnoremap sudow w !sudo tee % >/dev/null
" Open terminal
" map <C-A-t> :vsplit term://zsh<CR>
" Exit from terminal mode
tnoremap <C-e> <C-\><C-n>
" UltiSnips
let g:UltiSnipsExpandTrigger='<C-z>'
let g:UltiSnipsJumpForwardTrigger='<C-s>'
let g:UltiSnipsJumpBackwardTrigger='<C-g>'
let g:UltiSnipsListSnippets='<C-p>'
"==Encoding==
scriptencoding utf-8

View File

@ -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

View File

@ -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)}

View File

@ -9,33 +9,33 @@
" ░░░░░ ░░░░░░ ░░░ ░░░░░░ ░░░ ░░░░░░
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

View File

@ -47,6 +47,12 @@ vnoremap w :view<cr>gv
nnoremap cc cw<c-u>
nnoremap I za<c-u>
nnoremap <C-A-j> <C-w><C-j>
nnoremap <C-A-k> <C-w><C-k>
nnoremap <C-A-l> <C-w><C-l>
nnoremap <C-A-h> <C-w><C-h>
" ------------------------------------------------------------------------------
" :com[mand][!] command_name action

View File

@ -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/

View File

@ -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

View File

@ -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/

8
dotman
View File

@ -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() {