Commit e47c4e54 authored by Franciszek Madej's avatar Franciszek Madej 🤞

Merge branch 'master' of gitlab.com:franek_madej/dotfiles

parents f2127503 d25f1047
......@@ -10,7 +10,7 @@ Xft.lcdfilter: lcddefault
! xft font
! URxvt*letterSpace:-1
! *.font:Fira Code:style=Bold:size=8
*.font:Fira Code:size=10
*.font:Iosevka:size=10
! ui
URxvt*cursorUnderline: true
......
......@@ -5,12 +5,12 @@
set encoding =utf-8 " https://xkcd.com/927/
set autoindent " Indent according to previous line.
" set expandtab " Use spaces instead of tabs. - not active
set tabstop =2 " Tab key indents by 4 spaces.
set shiftwidth =2 " >> indents by tabstop spaces.
"set softtabstop =4 " >> indents by softtabstop spaces.
set shiftround " >> indents to next multiple of 'shiftwidth'.
set textwidth =120 " switched from 79. I'm a heathen, I know.
set expandtab " Use spaces instead of tabs
set tabstop =2 " Tab key indents by 4 spaces
set shiftwidth =2 " >> indents by tabstop spaces
set softtabstop =4 " >> indents by softtabstop spaces
set shiftround " >> indents to next multiple of 'shiftwidth'
set textwidth =120 " switched from 79. I'm a heathen, I know
set signcolumn =yes " Better UX for linters
set fileformat =unix " Obviously
......@@ -23,7 +23,7 @@ set showmode " Show current mode in command-line.
set showcmd " Show already typed keys when more are expected.
set incsearch " Highlight while searching with / or ?.
set hlsearch " Keep matches highlighted.
" set hlsearch " Keep matches highlighted.
set number relativenumber " Line numbers
set ttyfast " Faster redrawing.
......@@ -37,140 +37,48 @@ set wrapscan " Searches wrap around end-of-file.
set report =0 " Always report changed lines.
set synmaxcol =200 " Only highlight the first 200 columns.
"set list " Show non-printable characters.
"if has('multi_byte') && &encoding ==# 'utf-8'
" let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±'
" let &listchars = 'extends:❯,precedes:❮,nbsp:±'
"else
" " let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'
" let &listchars = 'extends:>,precedes:<,nbsp:.'
"endif
"" Disable arrows
map <right> <nop> " normal, visual, operation-pending
map <down> <nop>
map <left> <nop>
map <up> <nop>
imap <right> <nop> " insert mode
imap <down> <nop>
imap <left> <nop>
imap <up> <nop>
"" Split navigation
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
set wildmode =longest,full
" For a paranoia.
" Normally `:set nocp` is not needed, because it is done automatically
" when .vimrc is found.
if &compatible
" `:set nocp` has many side effects. Therefore this should be done
" only when 'compatible' is set.
set nocompatible
" `:set nocp` has many side effects. Therefore this should be done
" only when 'compatible' is set.
set nocompatible
endif
" Add the dein installation directory into runtimepath
set runtimepath+=~/.config/nvim/dein/repos/github.com/Shougo/dein.vim
if dein#load_state('~/.config/nvim/dein')
call dein#begin('~/.config/nvim/dein')
call dein#begin('~/.config/nvim/dein')
call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim')
call dein#add('~/.config/nvim/dein/repos/github.com/Shougo/dein.vim')
call dein#add('wsdjeg/dein-ui.vim')
call dein#add('Shougo/denite.nvim')
call dein#add('Shougo/defx.nvim')
call dein#add('chriskempson/base16-vim')
call dein#add('chaoren/vim-wordmotion')
" call dein#add('myusuf3/numbers.vim')
call dein#add('tpope/vim-commentary')
call dein#add('chriskempson/base16-vim')
call dein#add('sheerun/vim-polyglot')
call dein#add('editorconfig/editorconfig-vim')
call dein#add('framallo/taskwarrior.vim')
call dein#add('sheerun/vim-polyglot')
call dein#add('chaoren/vim-wordmotion')
call dein#add('tpope/vim-commentary')
call dein#add('editorconfig/editorconfig-vim')
" Statusline
call dein#add('vim-airline/vim-airline')
call dein#add('vim-airline/vim-airline-themes')
""" File managment """
call dein#add('junegunn/fzf')
call dein#add('junegunn/fzf.vim')
""" Prose """
call dein#add('junegunn/goyo.vim')
call dein#add('junegunn/limelight.vim')
if !empty($TERM)
source $HOME/.config/nvim/parts/cli-addons.vim
endif
endif
call dein#add('neoclide/coc.nvim', {'build': 'yarn install'})
call dein#add('prettier/vim-prettier', {'build': 'yarn install'})
if !empty($TERM)
source $HOME/.config/nvim/parts/commandline.vim
source $HOME/.config/nvim/parts/language.vim
source $HOME/.config/nvim/parts/statusline.vim
endif
call dein#end()
call dein#save_state()
let uname = system('uname -o')
if uname != "Android"
source $HOME/.config/nvim/parts/arrows.vim
endif
filetype plugin indent on
syntax on
""""""""""""""""""""""""""""""
""" Plugin settings here. """
""""""""""""""""""""""""""""""
set guifont=DejaVu\ Sans\ Mono:h11
set linespace=4
" More colors :)
let base16colorspace=256 " Access colors present in 256 colorspace
colorscheme base16-ocean
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#formatter = 'default'
let g:airline_theme = 'base16_ocean'
let g:airline_section_z = '%l:%v' " Simple line and row counter
" if you want to disable auto detect, comment out those two lines
"let g:airline#extensions#disable_rtp_load = 1
"let g:airline_extensions = ['branch', 'hunks', 'coc']
let g:airline_section_error = '%{airline#util#wrap(airline#extensions#coc#get_error(),0)}'
let g:airline_section_warning = '%{airline#util#wrap(airline#extensions#coc#get_warning(),0)}'
"""""""""""""""""""
""" Keybindings """
"""""""""""""""""""
" File and editor navigation
map <leader>F :F .<CR>
map <leader>f :Files .<CR>
map <leader>b :Buffers <CR>
" completion
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
""""""""""""""""""""""""""""""""""""
""" Python code editing settings """
""""""""""""""""""""""""""""""""""""
""" loosley based on
""" https://realpython.com/vim-and-python-a-match-made-in-heaven/
""" Make Python Code look pretty
let python_highlight_all=1
""" Ensure conforming to PEP8
au FileType python
\ setlocal tabstop=4 |
""""""""""""""""""""""""""""""""""""""""
""" JavaScript code editing settings """
""""""""""""""""""""""""""""""""""""""""
""" Ensure conforming to my style. :D
au FileType javascript,html,css,vue,typescript
\ setlocal tabstop=2 |
""""""""""""""""""""""""""""""""""""""""
"""""""" Writing prose settings """"""""
""""""""""""""""""""""""""""""""""""""""
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
"" Disable arrows
map <right> <nop>
map <down> <nop>
map <left> <nop>
map <up> <nop>
imap <right> <nop>
imap <down> <nop>
imap <left> <nop>
imap <up> <nop>
call dein#add('RRethy/vim-hexokinase')
call dein#add('christoomey/vim-tmux-navigator')
call dein#add('junegunn/fzf')
call dein#add('junegunn/fzf.vim')
call dein#add('junegunn/goyo.vim')
call dein#add('junegunn/limelight.vim')
call dein#add('neoclide/coc.nvim', {'build': 'yarn install'})
call dein#add('Shougo/denite.nvim')
call dein#add('framallo/taskwarrior.vim')
call dein#end()
call dein#save_state()
set list " Show non-printable characters.
if has('multi_byte') && &encoding ==# 'utf-8'
let &listchars = 'tab:▸ ,extends:❯,precedes:❮,nbsp:±'
let &listchars = 'extends:❯,precedes:❮,nbsp:±'
else
let &listchars = 'tab:> ,extends:>,precedes:<,nbsp:.'
let &listchars = 'extends:>,precedes:<,nbsp:.'
endif
map <leader>f :Files .<CR>
map <leader>b :Buffers <CR>
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
""" Language specific stuff
let python_highlight_all=1
""" Ensure conforming to PEP8
au FileType python
\ setlocal tabstop=4 |
""" Ensure conforming to my style. :D
au FileType javascript,html,css,vue,typescript
\ setlocal tabstop=2 |
" Dictionary: take mode() input -> longer notation of current mode
" mode() is defined by Vim
let g:currentmode={ 'n' : 'Normal ', 'no' : 'N·Operator Pending ', 'v' : 'Visual ', 'V' : 'V·Line ', '^V' : 'V·Block ', 's' : 'Select ', 'S': 'S·Line ', '^S' : 'S·Block ', 'i' : 'Insert ', 'R' : 'Replace ', 'Rv' : 'V·Replace ', 'c' : 'Command ', 'cv' : 'Vim Ex ', 'ce' : 'Ex ', 'r' : 'Prompt ', 'rm' : 'More ', 'r?' : 'Confirm ', '!' : 'Shell ', 't' : 'Terminal '}
" Function: return current mode
" abort -> function will abort soon as error detected
function! ModeCurrent() abort
let l:modecurrent = mode()
" use get() -> fails safely, since ^V doesn't seem to register
" 3rd arg is used when return of mode() == 0, which is case with ^V
" thus, ^V fails -> returns 0 -> replaced with 'V Block'
let l:modelist = tolower(get(g:currentmode, l:modecurrent, 'V·Block '))
let l:current_status_mode = l:modelist
return l:current_status_mode
endfunction
function! ReadOnly() abort
if &readonly || !&modifiable
return '  '
else
return ''
endfunction
function! StatusDiagnostic() abort
let info = get(b:, 'coc_diagnostic_info', {})
return 'e' . get(info, 'error', 0) . ' ' . 'w' . get(info, 'warning', 0)
endfunction
set noshowcmd
set noshowmode
set noruler
set statusline=
set statusline+=%1*
set statusline+=%*\ %{ModeCurrent()}%1*\
set statusline+=%*\ %t%m\
set statusline+=%{ReadOnly()}%1*
set statusline+=
set statusline+=%=
set statusline+=%*\ %{StatusDiagnostic()}\ %1*
" hi User1 ctermbg=#2B303B ctermfg=#C0C5CE guibg=#2B303B guifg=#C0C5CE
hi User1 guibg=#2B303B guifg=#C0C5CE
hi User2 ctermbg=red ctermfg=blue guibg=red guifg=blue
hi User3 ctermbg=blue ctermfg=green guibg=blue guifg=green
......@@ -4,7 +4,7 @@
#bold_is_bright = true
#clickable_url = true
#dynamic_title = true
font = Fira Code 9
font = Iosevka 10
#fullscreen = true
#icon_name = terminal
#mouse_autohide = false
......
# Base16 Tomorrow Night
# Base16 Ocean
# Author: Chris Kempson (http://chriskempson.com)
_gen_fzf_default_opts() {
local color00='#1d1f21'
local color01='#cc6666'
local color02='#b5bd68'
local color03='#f0c674'
local color04='#81a2be'
local color05='#b294bb'
local color06='#8abeb7'
local color07='#c5c8c6'
local color08='#c82829'
local color09='#f5871f'
local color0A='#b5bd68'
local color0B='#f0c674'
local color0C='#81a2be'
local color0D='#b294bb'
local color0E='#8abeb7'
local color0F='#c5c8c6'
local color00='#2b303b'
local color01='#343d46'
local color02='#4f5b66'
local color03='#65737e'
local color04='#a7adba'
local color05='#c0c5ce'
local color06='#dfe1e8'
local color07='#eff1f5'
local color08='#bf616a'
local color09='#d08770'
local color0A='#ebcb8b'
local color0B='#a3be8c'
local color0C='#96b5b4'
local color0D='#8fa1b3'
local color0E='#b48ead'
local color0F='#ab7967'
export FZF_DEFAULT_OPTS="
--color=bg+:$color01,bg:$color00,spinner:$color0C,hl:$color0D
--color=fg:$color04,header:$color0D,info:$color0A,pointer:$color0C
--color=marker:$color0C,fg+:$color06,prompt:$color0A,hl+:$color0D
--reverse
--preview 'file -bL --mime {} | rg text'
"
# --preview 'if [ -z \"\$(file -bL --mime {} | rg text)\" ]; then bat {}; else echo {}; fi'
#"
}
_gen_fzf_default_opts
# --color=bg+:$color00,bg:$color00,spinner:$color0C,hl:$color0B
# --color=fg:$color04,header:$color0D,info:$color0B,pointer:$color08
# --color=marker:$color0C,fg+:$color06,prompt:$color08,hl+:$color0B
......@@ -187,9 +187,3 @@ alias sudo='sudo ' # rm fix
# if command -v tmux>/dev/null; then
# [[ ! $TERM =~ screen ]] && [ -# z $TMUX ] && exec tmux
# fi
###-tns-completion-start-###
if [ -f /home/kosciak/.tnsrc ]; then
source /home/kosciak/.tnsrc
fi
###-tns-completion-end-###
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment