Compare commits

..

10 commits

11 changed files with 75 additions and 150 deletions

View file

@ -1,6 +1,6 @@
# docker
if [ -x "$(which docker)" ]; then
alias dc='docker-compose'
if type docker &>/dev/null; then
alias dc='docker compose'
alias killdocker='docker kill $(docker ps -q)'
alias cleardocker='docker system prune && docker volume prune'

View file

@ -1,5 +1,5 @@
# pacman and yay
if [ -x "$(which pacman)" ]; then
if type pacman &>/dev/null; then
alias spa='sudo pacman -S'
alias spaa='sudo pacman -S --overwrite="*"'
alias spu='sudo pacman -Syyuu'
@ -7,7 +7,7 @@ if [ -x "$(which pacman)" ]; then
alias spr='sudo pacman -R'
fi
if [ -x "$(which yay)" ]; then
if type yay &>/dev/null; then
alias ys='yay -S'
alias yss='yay -S --overwrite="*"'
alias yr='yay -R'
@ -15,7 +15,7 @@ if [ -x "$(which yay)" ]; then
fi
# brew
if [ -x "$(which pacman)" ]; then
if type brew &>/dev/null; then
alias bu='brew update && brew update --cask'
alias bup='brew upgrade && brew upgrade --cask'
alias bd='brew doctor'

View file

@ -11,13 +11,16 @@ alias e='exit'
alias grep='grep --color=auto'
# ls
if type exa &>/dev/null; then
alias ls='exa --icons -g'
lst() { exa --no-icons --sort=time | head --lines=1; }
fi
alias ll='ls -lh'
alias lls='ls -lhrs modified'
alias la='ls -a'
alias lla='ls -lha'
alias l='ls'
lst() { exa --no-icons --sort=time | head --lines=1; }
# python
alias py='python3'
@ -26,7 +29,9 @@ alias pip='python3 -m pip'
alias ipy='ipython --TerminalInteractiveShell.editing_mode=vi --TerminalInteractiveShell.timeoutlen=0.2'
# vim
if type nvim &>/dev/null; then
alias vim='nvim'
fi
alias v='vim'
alias vv='vifm'

View file

@ -1,42 +1,42 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" },
"bufferline.nvim": { "branch": "main", "commit": "64e2c5def50dfd6b6f14d96a45fa3d815a4a1eef" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" },
"bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" },
"dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
"flutter-tools.nvim": { "branch": "main", "commit": "01d72d9c1bdf2d454a60c5ba450f83e5ea783f6a" },
"gitsigns.nvim": { "branch": "main", "commit": "078041e9d060a386b0c9d3a8c7a7b019a35d3fb0" },
"dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" },
"flutter-tools.nvim": { "branch": "main", "commit": "990a1349c29f7d474a0cd51355aba773ccc9deea" },
"gitsigns.nvim": { "branch": "main", "commit": "4a143f13e122ab91abdc88f89eefbe70a4858a56" },
"harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" },
"indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
"lazy.nvim": { "branch": "main", "commit": "08954f723bf2d442ea020551e3acc956f4dc6dc7" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "eb4957442e3182f051b0ae11da32e06d22c190e3" },
"lsp-zero.nvim": { "branch": "v2.x", "commit": "9a686513eaaa13d737d0fec8956a18268ead8b29" },
"lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" },
"mini.nvim": { "branch": "main", "commit": "3fbc18cd225ee04fb712ed03ff835c4495f3494b" },
"neo-tree.nvim": { "branch": "main", "commit": "16d1b194376bf1fc2acd89ccb3c29ba8315bfcea" },
"noice.nvim": { "branch": "main", "commit": "d29b26c329558ee4bb2e7f3cc25078929ef89b2f" },
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
"nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" },
"nvim-base16": { "branch": "master", "commit": "b3e9ec6a82c05b562cd71f40fe8964438a9ba64a" },
"nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-lspconfig": { "branch": "master", "commit": "6e5c78ebc9936ca74add66bda22c566f951b6ee5" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-treesitter": { "branch": "master", "commit": "1c3fb9eac2a04230e4af23715fa2c190cbeacd70" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" },
"nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "8db12610bcb7ce67013cfdfaba4dd47a23c6e851" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"mini.indentscope": { "branch": "main", "commit": "f0d7faa064c892b96997810afcddfadc3f2a15b3" },
"mini.nvim": { "branch": "main", "commit": "f1dd64cf2ac1b348bd440e59446abf680c7188d6" },
"neo-tree.nvim": { "branch": "main", "commit": "974bbd434c25dc625185571b0455c831cfdde067" },
"noice.nvim": { "branch": "main", "commit": "e5cb20c6e14305d24025ecb77d7d4dd9d61f1a64" },
"nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-base16": { "branch": "master", "commit": "6ac181b5733518040a33017dde654059cd771b7c" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lspconfig": { "branch": "master", "commit": "4d38bece98300e3e5cd24a9aa0d0ebfea4951c16" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-treesitter": { "branch": "master", "commit": "3b5704440f88ecc98fb5afb5378b95acd4b2fa7f" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope.nvim": { "branch": "master", "commit": "c2b8311dfacd08b3056b8f0249025d633a4e71a8" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" },
"telescope.nvim": { "branch": "master", "commit": "f12b15e1b3a33524eb06a1ae7bc852fb1fd92197" },
"todo-comments.nvim": { "branch": "main", "commit": "70a93ce66083699571adc361166504b03cc39c2b" },
"trouble.nvim": { "branch": "main", "commit": "4d0f0454ae2a246ec3e0ff541a347164dac23b7b" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-ditto": { "branch": "master", "commit": "c21f0e2f651e0ae87788390dca2fb97af7fb8fcf" },
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" },
"window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" }
}

View file

@ -84,7 +84,7 @@ return {
{
"lua_ls",
"gopls",
"pyright",
"pylsp",
"tsserver",
}
)
@ -104,7 +104,7 @@ return {
nvim_lsp.lua_ls.setup(lsp.nvim_lua_ls())
nvim_lsp.gopls.setup({})
nvim_lsp.dartls.setup({})
nvim_lsp.pyright.setup({})
nvim_lsp.pylsp.setup({})
nvim_lsp.tsserver.setup({})
lsp.setup()

5
.config/scriptrc/fzf.sh Normal file
View file

@ -0,0 +1,5 @@
# fzf settings
if type fzf &>/dev/null; then
export FZF_DEFAULT_OPTS="--reverse --bind change:first --bind ctrl-j:down,ctrl-k:up -i --cycle --header-first --border rounded"
source <(fzf --zsh)
fi

View file

@ -5,6 +5,7 @@ from shutil import which
IGNORE = ["go", "parallels", "tmp", "library"]
MAX_DEPTH = 5
ENDING_DIRS = [".git", ".svn", ".hg", ".venv"]
def subdirs(path):
@ -40,17 +41,8 @@ def process_dir(path, prefix="", depth=0):
if depth >= MAX_DEPTH:
return {}
if os.path.exists(os.path.join(path, ".git")):
# dont wanna go deepper into repo
return {}
if os.path.exists(os.path.join(path, ".hg")):
return {}
if os.path.exists(os.path.join(path, ".svn")):
return {}
if os.path.exists(os.path.join(path, ".venv")):
for subdir in ENDING_DIRS:
if os.path.exists(os.path.abspath(os.path.join(path, "..", subdir))):
return {}
dirs = subdirs(path)

View file

@ -1,5 +1,5 @@
# run neofetch or tmux if available
if [ ! -z "$(which tmux 2>/dev/null)" ]; then
if type tmux &>/dev/null; then
if [ ! -n "$TMUX" ] || [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
exec tmux
fi

77
.vimrc
View file

@ -1,31 +1,10 @@
" Doman vimrc
set nocompatible " required by Vundle
set encoding=utf-8 " for better polish letters
set number relativenumber " relative number - gamechanger
set clipboard=unnamedplus " to yank into clipboard easily
set ignorecase smartcase " set search to case insensitive
set undofile
filetype off " required by Vundle
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" add all your plugins here
" VERY IMPORTANT
" BEFORE YOU INSTALL PLUGINS YOU NEED TO HAVE VIM PLUGGED
" PLUGIN MENAGER. TO INSTALL IT CLONE IT TO .vim/autoload/plug.vim:
" VIM_PLUG_INSTALL="https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs ${VIM_PLUG_INSTALL}
" vim +PlugInstall +qall
call plug#begin()
Plug 'sainnhe/edge'
Plug 'preservim/nerdtree'
Plug 'chriskempson/base16-vim'
Plug 'ryanoasis/vim-devicons'
Plug 'dense-analysis/ale'
call plug#end()
if has("unix")
let s:uname = system("uname -s")
@ -36,11 +15,8 @@ if has("unix")
endif
" ...
" All of your Plugins must be added before the following line
filetype plugin indent on " required
" leader
let mapleader = ","
let mapleader = " "
" Specify areas where screen splits
set splitbelow
@ -71,31 +47,10 @@ au BufNewFile,BufRead *.js,*.html,*.css,*.scss,*.yaml,*.yml,*.xlm,*.json
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
" better fold
let g:SimpylFold_docstring_preview=1
" Python syntax highlighting
let python_highlight_all=1
syntax on
" Theme config
" set termguicolors
let base16colorspace=256
colorscheme base16-ocean
" nerdtree settings
let NERDTreeIgnore=['\.pyc$', '\~$']
" FZF configuration
nnoremap <C-p> :Files<Cr>
nnoremap <C-o> :Rg<CR>
" open FZF if no file specified
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | execute 'NERDTree' | wincmd l | endif
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | execute 'NERDTree' argv()[0] | wincmd l | endif
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" cursor
let &t_SI.="\e[5 q" "SI = INSERT mode
let &t_SR.="\e[4 q" "SR = REPLACE mode
@ -105,9 +60,6 @@ let &t_EI.="\e[1 q" "EI = NORMAL mode (ELSE)
" <Ctrl-s> redraws the screen and removes any search highlighting.
nnoremap <silent> <C-s> :nohl<CR><C-l>
" keybinding for nerdtree
map <C-n> :NERDTreeToggle<CR>
" Enable folding with the spacebar
nnoremap <space> za
@ -126,30 +78,3 @@ vnoremap <leader>d "_d
vnoremap <leader>p "_dP
set signcolumn=yes
" ALE config
let g:ale_linters = {
\ 'python': ['pyls', 'flake8', 'mypy'],
\ 'cs': ['OmniSharp'],
\}
let g:ale_fixers = {
\ '*': ['trim_whitespace'],
\ 'python': ['black'],
\ 'css': ['prettier'],
\ 'scss': ['prettier'],
\ 'html': ['prettier'],
\ 'javascript': ['prettier'],
\ 'json': ['prettier'],
\ 'php': ['prettier'],
\ 'yaml': ['prettier'],
\}
" ale completion is really annoying
let g:ale_completion_enabled = 0
let g:ale_completion_tsserver_autoimport = 0
let g:ale_set_highlights = 0
let g:ale_disable_lsp = 1
" ALE
nmap <silent> <F5> <Plug>(ale_previous_wrap)
nmap <silent> <C-F5> <Plug>(ale_next_wrap)

32
.zshrc
View file

@ -24,6 +24,8 @@ RPROMPT=\$vcs_info_msg_0_
NEWLINE=$'\n'
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[magenta]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%(6~|...%3~|%~)%{$fg[red]%}]%{$fg[magenta]%}%-50(l:$ :$NEWLINE -> )%{$reset_color%}%b"
# exports - local bin, python, brew
export PATH="$HOME/.local/bin:$HOME/.bin:$HOME/.cargo/bin:${HOME}/go/bin/:/opt/homebrew/bin:$PATH:$PATH"
zstyle ':vcs_info:*' enable git hg svn
zstyle ':vcs_info:*' check-for-changes true
@ -31,6 +33,15 @@ zstyle ':vcs_info:git*' formats "%{${fg[cyan]}%}[%{${fg[green]}%}%s%{${fg[cyan]}
zstyle ':vcs_info:hg*' formats "%{${fg[cyan]}%}[%{${fg[green]}%}%s%{${fg[cyan]}%}][%{${fg[blue]}%}%b%{${fg[yellow]}%}%m%u%c%{${fg[cyan]}%}]%{$reset_color%}"
zstyle ':vcs_info:svn*' formats "%{${fg[cyan]}%}[%{${fg[green]}%}%s%{${fg[cyan]}%}][%{${fg[blue]}%}%b%{${fg[yellow]}%}%m%u%c%{${fg[cyan]}%}]%{$reset_color%}"
case $TERM in
tmux-256color)
export TERM=xterm-256color
;;
tmux*)
export TERM=xterm
;;
esac
# Title
case $TERM in
termite|*xterm*|rxvt|rxvt-unicode|rxvt-256color|rxvt-unicode-256color|(dt|k|E)term|xterm-256color)
@ -61,9 +72,10 @@ setopt HIST_IGNORE_ALL_DUPS
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
# Basic auto/tab complete:
# load brew specific thinys
if type brew &>/dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
autoload -Uz compinit
@ -183,8 +195,8 @@ bindkey '^R' history-incremental-search-backward
bindkey '\eOH' beginning-of-line
bindkey '\eOF' end-of-line
# IMPORTA
if [ ! -z "$(which nvim 2>/dev/null)" ]; then
# editor
if type nvim &>/dev/null; then
export EDITOR=nvim
else
export EDITOR=vim
@ -198,20 +210,6 @@ source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
bindkey '^ ' autosuggest-accept
bindkey '^l' autosuggest-accept
# fzf settings
export FZF_DEFAULT_OPTS="--reverse --bind change:first --bind ctrl-j:down,ctrl-k:up -i --cycle --header-first --border rounded"
# exports - local bin, python, brew
export PATH="$HOME/.local/bin:$HOME/.bin:/Users/$USER/Library/Python/3.9/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/opt/libpq/bin:/opt/homebrew/bin:/opt/homebrew/sbin:$HOME/.cargo/bin:$PATH"
# mysql client on macos
export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
export PATH="/opt/homebrew/opt/dotnet@6/bin:$PATH"
export PATH="${HOME}/Library/Android/sdk/tools:${HOME}/Library/Android/sdk/platform-tools:${PATH}"
export LDFLAGS="-L/opt/homebrew/opt/mysql-client/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mysql-client/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig"
# Load aliases and shortcuts if existent.
if [ -d "$HOME/.config/aliasrc" ]; then
for ALIASFILE in $HOME/.config/aliasrc/*; do

View file

@ -7,7 +7,7 @@ I stole this idea. But it works magic.
To setup dotfiles run:
```bash
REPO_URL=git@github.com:ickyicky/dot.git
REPO_URL=ssh://git@gitea.domandoman.xyz:222/doman/dot.git
git clone --bare $REPO_URL $HOME/.dot/
alias dot="/usr/bin/git --git-dir=$HOME/.dot/ --work-tree=$HOME"
dot config status.showUntrackedFiles no