chore: linting

This commit is contained in:
2025-10-13 14:14:45 +03:00
parent 88a2b3dadf
commit 7b6e95c4ab
89 changed files with 1556 additions and 706 deletions

View File

@@ -69,5 +69,3 @@ Available format modifiers are:
'. For decimal conversions, applies the thousands grouping
separator to the integer portion of the output according
to the current LC_NUMERIC file.

View File

@@ -56,11 +56,11 @@ TERM xterm*
RESET 0 # reset to "normal" color
DIR 01;34 # directory
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 40;33 # pipe
SOCK 01;35 # socket
DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...

View File

@@ -10,4 +10,3 @@ prefix = [
exact = [
"~/.dotfiles/.envrc"
]

View File

@@ -1,5 +1,6 @@
### Do not edit. This was autogenerated by 'asdf direnv setup' ###
# shellcheck shell=bash
use_asdf() {
use_asdf()
{
source_env "$(asdf direnv envrc "$@")"
}

View File

@@ -6,9 +6,12 @@ alias vim='vim -u "$XDG_CONFIG_HOME/vim/vimrc"'
if type -q eza >/dev/null
function eza_git -d "Use eza and its git options if in a git repo"
if git rev-parse --is-inside-work-tree &>/dev/null
eza --group-directories-first --icons=always --smart-group --git $argv
eza --group-directories-first --icons=always \
--smart-group --git $argv
else
eza --group-directories-first --icons=always --smart-group $argv
eza --group-directories-first \
--icons=always \
--smart-group $argv
end
end
@@ -30,7 +33,9 @@ if type -q eza >/dev/null
end
# Edit fish alias file
function .a --wraps='nvim ~/.dotfiles/config/fish/alias.fish' --description 'edit alias.fish'
function .a \
--wraps='nvim ~/.dotfiles/config/fish/alias.fish' \
--description 'edit alias.fish'
nvim ~/.dotfiles/config/fish/alias.fish $argv
end
@@ -55,7 +60,9 @@ function .p --wraps='cd ~/Code/ivuorinen' --description 'cd ~/Code/ivuorinen'
end
# shortcut to commit with a message
function commit --wraps='git commit -a -m "chore: automated commit"' --description 'commit shortcut'
function commit \
--wraps='git commit -a -m "chore: automated commit"' \
--description 'commit shortcut'
set -l commitMessage $argv
git add .
@@ -71,7 +78,8 @@ function commit --wraps='git commit -a -m "chore: automated commit"' --descripti
git commit -a -m "$commitMessage"
end
function configure_tide --description 'Configure tide with the lean style and my preferences'
function configure_tide \
--description 'Configure tide with the lean style and my preferences'
tide configure \
--auto \
--style=Lean \

View File

@@ -122,4 +122,3 @@ complete -c aqua -n '__fish_seen_subcommand_from root-dir' -f -l help -s h -d 's
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'root-dir' -d 'Output the aqua root directory (AQUA_ROOT_DIR)'
complete -c aqua -n '__fish_seen_subcommand_from help h' -f -l help -s h -d 'show help'
complete -r -c aqua -n '__fish_aqua_no_subcommand' -a 'help h' -d 'Shows a list of commands or help for one command'

View File

@@ -173,4 +173,3 @@ complete -c git-profile -e
# The call to __git_profile_prepare_completions will setup __git_profile_comp_results
# which provides the program's completion choices.
complete -c git-profile -n '__git_profile_prepare_completions' -f -a '$__git_profile_comp_results'

View File

@@ -120,4 +120,3 @@ complete -c phpenv -f \
# Complete help options
complete -c phpenv -f -s h -l help -d "Show help"

View File

@@ -35,4 +35,3 @@ if test -n "$PHPENV_GLOBAL_VERSION"; and not set -q PHPENV_INITIALIZED
end
set -g PHPENV_INITIALIZED true
end

View File

@@ -48,19 +48,23 @@ test -z "$NVIM_UNDO_PATH" && set -x NVIM_UNDO_PATH "$NVIM_STATE/undo"
# Ansible configuration
set -q ANSIBLE_HOME; or set -x ANSIBLE_HOME "$XDG_CONFIG_HOME/ansible"
set -q ANSIBLE_CONFIG; or set -x ANSIBLE_CONFIG "$ANSIBLE_HOME/ansible.cfg"
set -q ANSIBLE_GALAXY_CACHE_DIR; or set -x ANSIBLE_GALAXY_CACHE_DIR "$XDG_CACHE_HOME/ansible/galaxy_cache"
set -q ANSIBLE_GALAXY_CACHE_DIR; or \
set -x ANSIBLE_GALAXY_CACHE_DIR "$XDG_CACHE_HOME/ansible/galaxy_cache"
x-dc "$ANSIBLE_HOME"
x-dc "$ANSIBLE_GALAXY_CACHE_DIR"
# AWS configuration
set -q AWS_CONFIG_FILE; or set -x AWS_CONFIG_FILE "$XDG_STATE_HOME/aws/config"
set -q AWS_SHARED_CREDENTIALS_FILE; or set -x AWS_SHARED_CREDENTIALS_FILE "$XDG_STATE_HOME/aws/credentials"
set -q AWS_SESSION_TOKEN; or set -x AWS_SESSION_TOKEN "$XDG_STATE_HOME/aws/session_token"
set -q AWS_SHARED_CREDENTIALS_FILE; or \
set -x AWS_SHARED_CREDENTIALS_FILE "$XDG_STATE_HOME/aws/credentials"
set -q AWS_SESSION_TOKEN; or \
set -x AWS_SESSION_TOKEN "$XDG_STATE_HOME/aws/session_token"
set -q AWS_DATA_PATH; or set -x AWS_DATA_PATH "$XDG_DATA_HOME/aws"
set -q AWS_DEFAULT_OUTPUT; or set -x AWS_DEFAULT_OUTPUT table
set -q AWS_CONFIGURE_KEYS; or set -x AWS_CONFIGURE_KEYS true
set -q AWS_CONFIGURE_SESSION; or set -x AWS_CONFIGURE_SESSION true
set -q AWS_CONFIGURE_SESSION_DURATION; or set -x AWS_CONFIGURE_SESSION_DURATION 7200
set -q AWS_CONFIGURE_SESSION_DURATION; or \
set -x AWS_CONFIGURE_SESSION_DURATION 7200
set -q AWS_CONFIGURE_SESSION_MFA; or set -x AWS_CONFIGURE_SESSION_MFA true
set -q AWS_CONFIGURE_PROFILE; or set -x AWS_CONFIGURE_PROFILE true
set -q AWS_CONFIGURE_PROMPT; or set -x AWS_CONFIGURE_PROMPT true
@@ -70,7 +74,8 @@ set -q AWS_CONFIGURE_PROMPT_DEFAULT; or set -x AWS_CONFIGURE_PROMPT_DEFAULT true
set -q HOMEBREW_NO_ANALYTICS; or set -x HOMEBREW_NO_ANALYTICS true
set -q HOMEBREW_NO_ENV_HINTS; or set -x HOMEBREW_NO_ENV_HINTS true
set -q HOMEBREW_BUNDLE_MAS_SKIP; or set -x HOMEBREW_BUNDLE_MAS_SKIP true
set -q HOMEBREW_BUNDLE_FILE; or set -x HOMEBREW_BUNDLE_FILE "$XDG_CONFIG_HOME/homebrew/Brewfile"
set -q HOMEBREW_BUNDLE_FILE; or \
set -x HOMEBREW_BUNDLE_FILE "$XDG_CONFIG_HOME/homebrew/Brewfile"
# Composer configuration
set -q COMPOSER_HOME; or set -x COMPOSER_HOME "$XDG_STATE_HOME/composer"
@@ -96,7 +101,9 @@ set -q FNM_RESOLVE_ENGINES; or set -x FNM_RESOLVE_ENGINES true
# fzf configuration
set -q FZF_BASE; or set -x FZF_BASE "$XDG_CONFIG_HOME/fzf"
set -q FZF_DEFAULT_OPTS; or set -x FZF_DEFAULT_OPTS '--height 40% --tmux bottom,70% --layout reverse --border top'
set -q FZF_DEFAULT_OPTS; or \
set -x FZF_DEFAULT_OPTS \
'--height 40% --tmux bottom,40% --layout reverse --border top'
# GnuPG configuration
set -q GNUPGHOME; or set -x GNUPGHOME "$XDG_DATA_HOME/gnupg"
@@ -106,7 +113,8 @@ set -q GNUPGHOME; or set -x GNUPGHOME "$XDG_DATA_HOME/gnupg"
set -q GOBIN; or set -x GOBIN "$XDG_BIN_HOME"
set -q GOENV_ROOT; or set -x GOENV_ROOT "$XDG_DATA_HOME/goenv"
set -q GOENV_RC_FILE; or set -x GOENV_RC_FILE "$XDG_CONFIG_HOME/goenv/goenvrc.fish"
set -q GOENV_RC_FILE; or \
set -x GOENV_RC_FILE "$XDG_CONFIG_HOME/goenv/goenvrc.fish"
# 1Password configuration
set -q OP_CACHE; or set -x OP_CACHE "$XDG_STATE_HOME/1password"
@@ -134,19 +142,23 @@ set -q SCREENRC; or set -x SCREENRC "$XDG_CONFIG_HOME/misc/screenrc"
# Sonarlint configuration
set -q SONARLINT_HOME; or set -x SONARLINT_HOME "$XDG_DATA_HOME/sonarlint"
set -q SONARLINT_BIN; or set -x SONARLINT_BIN "$XDG_BIN_HOME"
set -q SONARLINT_USER_HOME; or set -x SONARLINT_USER_HOME "$XDG_DATA_HOME/sonarlint"
set -q SONARLINT_USER_HOME; or \
set -x SONARLINT_USER_HOME "$XDG_DATA_HOME/sonarlint"
# Terraform configuration
set -q TF_DATA_DIR; or set -x TF_DATA_DIR "$XDG_STATE_HOME/terraform"
set -q TF_CLI_CONFIG_FILE; or set -x TF_CLI_CONFIG_FILE "$XDG_CONFIG_HOME/terraform/terraformrc"
set -q TF_PLUGIN_CACHE_DIR; or set -x TF_PLUGIN_CACHE_DIR "$XDG_CACHE_HOME/terraform/plugin-cache"
set -q TF_CLI_CONFIG_FILE; or \
set -x TF_CLI_CONFIG_FILE "$XDG_CONFIG_HOME/terraform/terraformrc"
set -q TF_PLUGIN_CACHE_DIR; or \
set -x TF_PLUGIN_CACHE_DIR "$XDG_CACHE_HOME/terraform/plugin-cache"
# tmux configuration
set -q TMUX_TMPDIR; or set -x TMUX_TMPDIR "$XDG_STATE_HOME/tmux"
set -q TMUX_CONF_DIR; or set -x TMUX_CONF_DIR "$XDG_CONFIG_HOME/tmux"
set -q TMUX_PLUGINS; or set -x TMUX_PLUGINS "$TMUX_CONF_DIR/plugins"
set -q TMUX_CONF; or set -x TMUX_CONF "$TMUX_CONF_DIR/tmux.conf"
set -q TMUX_PLUGIN_MANAGER_PATH; or set -x TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGINS"
set -q TMUX_PLUGIN_MANAGER_PATH; or \
set -x TMUX_PLUGIN_MANAGER_PATH "$TMUX_PLUGINS"
# Source tmux theme activation script for Fish shell
if test -f "$DOTFILES/config/tmux/theme-activate.fish"
@@ -154,7 +166,8 @@ if test -f "$DOTFILES/config/tmux/theme-activate.fish"
end
# tms configuration
set -q TMS_CONFIG_FILE; or set -x TMS_CONFIG_FILE "$XDG_CONFIG_HOME/tms/config.toml"
set -q TMS_CONFIG_FILE; or \
set -x TMS_CONFIG_FILE "$XDG_CONFIG_HOME/tms/config.toml"
# wakatime configuration
set -q WAKATIME_HOME; or set -x WAKATIME_HOME "$XDG_STATE_HOME/wakatime"
@@ -166,7 +179,8 @@ set -q _ZO_EXCLUDE_DIRS; or set -x _ZO_EXCLUDE_DIRS "$XDG_DATA_HOME"
# Miscellaneous configuration
set -q CHEAT_USE_FZF; or set -x CHEAT_USE_FZF true
set -q SQLITE_HISTORY; or set -x SQLITE_HISTORY "$XDG_CACHE_HOME/sqlite/sqlite_history"
set -q SQLITE_HISTORY; or \
set -x SQLITE_HISTORY "$XDG_CACHE_HOME/sqlite/sqlite_history"
# Source additional configuration files if they exist
if test -f "$DOTFILES/config/fish/exports-secret.fish"
@@ -186,6 +200,8 @@ set -gx tide_prompt_transient_enabled true
set -gx tide_prompt_add_newline_before true
set -gx tide_prompt_min_cols 34
set -gx tide_prompt_pad_items false
set -gx tide_left_prompt_items context pwd git node python rustc java php pulumi ruby go gcloud newline character
set -gx tide_left_prompt_items context pwd git node python rustc java php \
pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell \
crystal elixir zig newline character
set -gx tide_right_prompt_items status jobs direnv
set -gx tide_context_hostname_parts 1

View File

@@ -6,4 +6,3 @@ function _puffer_fish_expand_bang
commandline -i '!'
end
end

View File

@@ -1,4 +1,3 @@
function nvm
bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv
end

View File

@@ -56,7 +56,7 @@ function ___paths_plugin_handle_found_item -a testName outFlags
end
set nameOut (string trim -- "$nameOut")
# do the tick
# do the tick
if set -q _flag_k # is not color
set nameOut "- $nameOut"
else # is color
@@ -155,7 +155,7 @@ function paths --description "Reveal the executable matches in shell paths or fi
end
end
# check
# check
set -l built (type --type $input 12&>/dev/null)
if test -n "$built"
and test "$built" = 'builtin'

View File

@@ -1075,4 +1075,3 @@ function __phpenv_validate_extensions -a phpenv_extensions_string
return 1
end
end

View File

@@ -11,63 +11,63 @@
if [[ $- =~ i ]]; then
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path > /dev/null; then
_fzf_compgen_path() {
echo "$1"
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
if ! declare -f _fzf_compgen_dir > /dev/null; then
_fzf_compgen_dir() {
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2> /dev/null | sed 's@^\./@@'
}
fi
###########################################################
# To redraw line after fzf closes (printf '\e[5n')
bind '"\e[0n": redraw-current-line' 2> /dev/null
__fzf_comprun() {
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
_fzf_comprun "$@"
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else
shift
fzf "$@"
# To use custom commands instead of find, override _fzf_compgen_{path,dir}
if ! declare -f _fzf_compgen_path >/dev/null; then
_fzf_compgen_path() {
echo "$1"
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o \( -type d -o -type f -o -type l \) \
-a -not -path "$1" -print 2>/dev/null | sed 's@^\./@@'
}
fi
}
__fzf_orig_completion() {
local l comp f cmd
while read -r l; do
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
comp="${BASH_REMATCH[1]}"
f="${BASH_REMATCH[2]}"
cmd="${BASH_REMATCH[3]}"
[[ "$f" = _fzf_* ]] && continue
printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"
if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then
__fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "
fi
if ! declare -f _fzf_compgen_dir >/dev/null; then
_fzf_compgen_dir() {
command find -L "$1" \
-name .git -prune -o -name .hg -prune -o -name .svn -prune -o -type d \
-a -not -path "$1" -print 2>/dev/null | sed 's@^\./@@'
}
fi
###########################################################
# To redraw line after fzf closes (printf '\e[5n')
bind '"\e[0n": redraw-current-line' 2>/dev/null
__fzf_comprun() {
if [[ "$(type -t _fzf_comprun 2>&1)" = function ]]; then
_fzf_comprun "$@"
elif [[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; }; then
shift
fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- "$@"
else
shift
fzf "$@"
fi
done
}
}
_fzf_opts_completion() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="
__fzf_orig_completion() {
local l comp f cmd
while read -r l; do
if [[ "$l" =~ ^(.*\ -F)\ *([^ ]*).*\ ([^ ]*)$ ]]; then
comp="${BASH_REMATCH[1]}"
f="${BASH_REMATCH[2]}"
cmd="${BASH_REMATCH[3]}"
[[ "$f" = _fzf_* ]] && continue
printf -v "_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}" "%s" "${comp} %s ${cmd} #${f}"
if [[ "$l" = *" -o nospace "* ]] && [[ ! "${__fzf_nospace_commands-}" = *" $cmd "* ]]; then
__fzf_nospace_commands="${__fzf_nospace_commands-} $cmd "
fi
fi
done
}
_fzf_opts_completion() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD - 1]}"
opts="
-x --extended
-e --exact
--algo
@@ -110,206 +110,206 @@ _fzf_opts_completion() {
--expect
--sync"
case "${prev}" in
--tiebreak)
COMPREPLY=( $(compgen -W "length begin end index" -- "$cur") )
return 0
;;
--color)
COMPREPLY=( $(compgen -W "dark light 16 bw" -- "$cur") )
return 0
;;
--history)
COMPREPLY=()
return 0
;;
esac
case "${prev}" in
--tiebreak)
COMPREPLY=($(compgen -W "length begin end index" -- "$cur"))
return 0
;;
--color)
COMPREPLY=($(compgen -W "dark light 16 bw" -- "$cur"))
return 0
;;
--history)
COMPREPLY=()
return 0
;;
esac
if [[ "$cur" =~ ^-|\+ ]]; then
COMPREPLY=( $(compgen -W "${opts}" -- "$cur") )
return 0
fi
return 0
}
_fzf_handle_dynamic_completion() {
local cmd orig_var orig ret orig_cmd orig_complete
cmd="$1"
shift
orig_cmd="$1"
orig_var="_fzf_orig_completion_$cmd"
orig="${!orig_var-}"
orig="${orig##*#}"
if [[ -n "$orig" ]] && type "$orig" > /dev/null 2>&1; then
$orig "$@"
elif [[ -n "${_fzf_completion_loader-}" ]]; then
orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)
_completion_loader "$@"
ret=$?
# _completion_loader may not have updated completion for the command
if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then
__fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
eval "${orig_complete/ -F / -o nospace -F }"
else
eval "$orig_complete"
fi
if [[ "$cur" =~ ^-|\+ ]]; then
COMPREPLY=($(compgen -W "${opts}" -- "$cur"))
return 0
fi
return $ret
fi
}
__fzf_generic_path_completion() {
local cur base dir leftover matches trigger cmd
cmd="${COMP_WORDS[0]}"
if [[ $cmd == \\* ]]; then
cmd="${cmd:1}"
fi
cmd="${cmd//[^A-Za-z0-9_=]/_}"
COMPREPLY=()
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
base=${cur:0:${#cur}-${#trigger}}
eval "base=$base"
return 0
}
dir=
[[ $base = *"/"* ]] && dir="$base"
while true; do
if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then
leftover=${base/#"$dir"}
leftover=${leftover/#\/}
[[ -z "$dir" ]] && dir='.'
[[ "$dir" != "/" ]] && dir="${dir/%\//}"
matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do
printf "%q " "${item%$3}$3"
done)
matches=${matches% }
[[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "
if [[ -n "$matches" ]]; then
COMPREPLY=( "$matches" )
_fzf_handle_dynamic_completion() {
local cmd orig_var orig ret orig_cmd orig_complete
cmd="$1"
shift
orig_cmd="$1"
orig_var="_fzf_orig_completion_$cmd"
orig="${!orig_var-}"
orig="${orig##*#}"
if [[ -n "$orig" ]] && type "$orig" >/dev/null 2>&1; then
$orig "$@"
elif [[ -n "${_fzf_completion_loader-}" ]]; then
orig_complete=$(complete -p "$orig_cmd" 2>/dev/null)
_completion_loader "$@"
ret=$?
# _completion_loader may not have updated completion for the command
if [[ "$(complete -p "$orig_cmd" 2>/dev/null)" != "$orig_complete" ]]; then
__fzf_orig_completion < <(complete -p "$orig_cmd" 2>/dev/null)
if [[ "${__fzf_nospace_commands-}" = *" $orig_cmd "* ]]; then
eval "${orig_complete/ -F / -o nospace -F }"
else
COMPREPLY=( "$cur" )
eval "$orig_complete"
fi
printf '\e[5n'
return 0
fi
dir=$(dirname "$dir")
[[ "$dir" =~ /$ ]] || dir="$dir"/
done
else
shift
shift
shift
_fzf_handle_dynamic_completion "$cmd" "$@"
fi
}
_fzf_complete() {
# Split arguments around --
local args rest str_arg i sep
args=("$@")
sep=
for i in "${!args[@]}"; do
if [[ "${args[$i]}" = -- ]]; then
sep=$i
break
return $ret
fi
done
if [[ -n "$sep" ]]; then
str_arg=
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
args=("${args[@]:0:$sep}")
else
str_arg=$1
args=()
shift
rest=("$@")
fi
}
local cur selected trigger cmd post
post="$(caller 0 | awk '{print $2}')_post"
type -t "$post" > /dev/null 2>&1 || post=cat
__fzf_generic_path_completion() {
local cur base dir leftover matches trigger cmd
cmd="${COMP_WORDS[0]}"
if [[ $cmd == \\* ]]; then
cmd="${cmd:1}"
fi
cmd="${cmd//[^A-Za-z0-9_=]/_}"
COMPREPLY=()
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
base=${cur:0:${#cur}-${#trigger}}
eval "base=$base"
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
cur=${cur:0:${#cur}-${#trigger}}
selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ')
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
if [[ -n "$selected" ]]; then
COMPREPLY=("$selected")
dir=
[[ $base = *"/"* ]] && dir="$base"
while true; do
if [[ -z "$dir" ]] || [[ -d "$dir" ]]; then
leftover=${base/#"$dir"/}
leftover=${leftover/#\//}
[[ -z "$dir" ]] && dir='.'
[[ "$dir" != "/" ]] && dir="${dir/%\//}"
matches=$(eval "$1 $(printf %q "$dir")" | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $2" __fzf_comprun "$4" -q "$leftover" | while read -r item; do
printf "%q " "${item%$3}$3"
done)
matches=${matches% }
[[ -z "$3" ]] && [[ "${__fzf_nospace_commands-}" = *" ${COMP_WORDS[0]} "* ]] && matches="$matches "
if [[ -n "$matches" ]]; then
COMPREPLY=("$matches")
else
COMPREPLY=("$cur")
fi
printf '\e[5n'
return 0
fi
dir=$(dirname "$dir")
[[ "$dir" =~ /$ ]] || dir="$dir"/
done
else
COMPREPLY=("$cur")
shift
shift
shift
_fzf_handle_dynamic_completion "$cmd" "$@"
fi
printf '\e[5n'
return 0
else
_fzf_handle_dynamic_completion "$cmd" "${rest[@]}"
fi
}
}
_fzf_path_completion() {
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
}
_fzf_complete() {
# Split arguments around --
local args rest str_arg i sep
args=("$@")
sep=
for i in "${!args[@]}"; do
if [[ "${args[$i]}" = -- ]]; then
sep=$i
break
fi
done
if [[ -n "$sep" ]]; then
str_arg=
rest=("${args[@]:$((sep + 1)):${#args[@]}}")
args=("${args[@]:0:$sep}")
else
str_arg=$1
args=()
shift
rest=("$@")
fi
# Deprecated. No file only completion.
_fzf_file_completion() {
_fzf_path_completion "$@"
}
local cur selected trigger cmd post
post="$(caller 0 | awk '{print $2}')_post"
type -t "$post" >/dev/null 2>&1 || post=cat
_fzf_dir_completion() {
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
}
cmd="${COMP_WORDS[0]//[^A-Za-z0-9_=]/_}"
trigger=${FZF_COMPLETION_TRIGGER-'**'}
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == *"$trigger" ]]; then
cur=${cur:0:${#cur}-${#trigger}}
_fzf_complete_kill() {
_fzf_proc_completion "$@"
}
selected=$(FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-40%} --reverse --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} ${FZF_COMPLETION_OPTS-} $str_arg" __fzf_comprun "${rest[0]}" "${args[@]}" -q "$cur" | $post | tr '\n' ' ')
selected=${selected% } # Strip trailing space not to repeat "-o nospace"
if [[ -n "$selected" ]]; then
COMPREPLY=("$selected")
else
COMPREPLY=("$cur")
fi
printf '\e[5n'
return 0
else
_fzf_handle_dynamic_completion "$cmd" "${rest[@]}"
fi
}
_fzf_proc_completion() {
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
command ps -eo user,pid,ppid,start,time,command 2> /dev/null ||
command ps -eo user,pid,ppid,time,args # For BusyBox
)
}
_fzf_path_completion() {
__fzf_generic_path_completion _fzf_compgen_path "-m" "" "$@"
}
_fzf_proc_completion_post() {
awk '{print $2}'
}
# Deprecated. No file only completion.
_fzf_file_completion() {
_fzf_path_completion "$@"
}
_fzf_host_completion() {
_fzf_complete +m -- "$@" < <(
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2> /dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
_fzf_dir_completion() {
__fzf_generic_path_completion _fzf_compgen_dir "" "/" "$@"
}
_fzf_complete_kill() {
_fzf_proc_completion "$@"
}
_fzf_proc_completion() {
_fzf_complete -m --header-lines=1 --preview 'echo {}' --preview-window down:3:wrap --min-height 15 -- "$@" < <(
command ps -eo user,pid,ppid,start,time,command 2>/dev/null ||
command ps -eo user,pid,ppid,time,args # For BusyBox
)
}
_fzf_proc_completion_post() {
awk '{print $2}'
}
_fzf_host_completion() {
_fzf_complete +m -- "$@" < <(
command cat <(command tail -n +1 ~/.ssh/config ~/.ssh/config.d/* /etc/ssh/ssh_config 2>/dev/null | command grep -i '^\s*host\(name\)\? ' | awk '{for (i = 2; i <= NF; i++) print $1 " " $i}' | command grep -v '[*?%]') \
<(command grep -oE '^[[a-z0-9.,:-]+' ~/.ssh/known_hosts | tr ',' '\n' | tr -d '[' | awk '{ print $1 " " $1 }') \
<(command grep -v '^\s*\(#\|$\)' /etc/hosts | command grep -Fv '0.0.0.0') |
awk '{if (length($2) > 0) {print $2}}' | sort -u
)
}
)
}
_fzf_var_completion() {
_fzf_complete -m -- "$@" < <(
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
)
}
_fzf_var_completion() {
_fzf_complete -m -- "$@" < <(
declare -xp | sed -En 's|^declare [^ ]+ ([^=]+).*|\1|p'
)
}
_fzf_alias_completion() {
_fzf_complete -m -- "$@" < <(
alias | sed -En 's|^alias ([^=]+).*|\1|p'
)
}
_fzf_alias_completion() {
_fzf_complete -m -- "$@" < <(
alias | sed -En 's|^alias ([^=]+).*|\1|p'
)
}
# fzf options
complete -o default -F _fzf_opts_completion fzf
# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf
# itself. As a quick improvement we take fzf's completion. Adding the few extra
# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.
complete -o default -F _fzf_opts_completion fzf-tmux
# fzf options
complete -o default -F _fzf_opts_completion fzf
# fzf-tmux is a thin fzf wrapper that has only a few more options than fzf
# itself. As a quick improvement we take fzf's completion. Adding the few extra
# fzf-tmux specific options (like `-w WIDTH`) are left as a future patch.
complete -o default -F _fzf_opts_completion fzf-tmux
d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}"
a_cmds="
d_cmds="${FZF_COMPLETION_DIR_COMMANDS:-cd pushd rmdir}"
a_cmds="
awk bat cat diff diff3
emacs emacsclient ex file ftp g++ gcc gvim head hg hx java
javac ld less more mvim nvim patch perl python ruby
@@ -319,64 +319,64 @@ a_cmds="
ln ls mv open rm rsync scp
svn tar unzip zip"
# Preserve existing completion
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2> /dev/null)
# Preserve existing completion
__fzf_orig_completion < <(complete -p $d_cmds $a_cmds 2>/dev/null)
if type _completion_loader > /dev/null 2>&1; then
_fzf_completion_loader=1
fi
__fzf_defc() {
local cmd func opts orig_var orig def
cmd="$1"
func="$2"
opts="$3"
orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"
orig="${!orig_var-}"
if [[ -n "$orig" ]]; then
printf -v def "$orig" "$func"
eval "$def"
else
complete -F "$func" $opts "$cmd"
if type _completion_loader >/dev/null 2>&1; then
_fzf_completion_loader=1
fi
}
# Anything
for cmd in $a_cmds; do
__fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"
done
__fzf_defc() {
local cmd func opts orig_var orig def
cmd="$1"
func="$2"
opts="$3"
orig_var="_fzf_orig_completion_${cmd//[^A-Za-z0-9_]/_}"
orig="${!orig_var-}"
if [[ -n "$orig" ]]; then
printf -v def "$orig" "$func"
eval "$def"
else
complete -F "$func" $opts "$cmd"
fi
}
# Directory
for cmd in $d_cmds; do
__fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames"
done
unset cmd d_cmds a_cmds
_fzf_setup_completion() {
local kind fn cmd
kind=$1
fn=_fzf_${1}_completion
if [[ $# -lt 2 ]] || ! type -t "$fn" > /dev/null; then
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
return 1
fi
shift
__fzf_orig_completion < <(complete -p "$@" 2> /dev/null)
for cmd in "$@"; do
case "$kind" in
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
esac
# Anything
for cmd in $a_cmds; do
__fzf_defc "$cmd" _fzf_path_completion "-o default -o bashdefault"
done
}
# Environment variables / Aliases / Hosts / Process
_fzf_setup_completion 'var' export unset printenv
_fzf_setup_completion 'alias' unalias
_fzf_setup_completion 'host' ssh telnet
_fzf_setup_completion 'proc' kill
# Directory
for cmd in $d_cmds; do
__fzf_defc "$cmd" _fzf_dir_completion "-o nospace -o dirnames"
done
unset cmd d_cmds a_cmds
_fzf_setup_completion() {
local kind fn cmd
kind=$1
fn=_fzf_${1}_completion
if [[ $# -lt 2 ]] || ! type -t "$fn" >/dev/null; then
echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."
return 1
fi
shift
__fzf_orig_completion < <(complete -p "$@" 2>/dev/null)
for cmd in "$@"; do
case "$kind" in
dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;
var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
alias) __fzf_defc "$cmd" "$fn" "-a" ;;
*) __fzf_defc "$cmd" "$fn" "-o default -o bashdefault" ;;
esac
done
}
# Environment variables / Aliases / Hosts / Process
_fzf_setup_completion 'var' export unset printenv
_fzf_setup_completion 'alias' unalias
_fzf_setup_completion 'host' ssh telnet
_fzf_setup_completion 'proc' kill
fi

7
config/fzf/everforest.sh Normal file
View File

@@ -0,0 +1,7 @@
# Everforest theme for fzf
# Generated from template - do not edit manually
export FZF_DEFAULT_OPTS=" \
--color=bg+:#374247,bg:#2f383e,spinner:#83c092,hl:#a7c080 \
--color=fg:#d3c6aa,header:#a7c080,info:#dbbc7f,pointer:#83c092 \
--color=marker:#83c092,fg+:#d3c6aa,prompt:#dbbc7f,hl+:#a7c080"

View File

@@ -4,7 +4,7 @@
# Auto-completion
# ---------------
# shellcheck source=completion.bash
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2> /dev/null
[[ $- == *i* ]] && source "$HOME/.dotfiles/config/fzf/completion.bash" 2>/dev/null
# Key bindings
# ------------

View File

@@ -23,81 +23,84 @@ __fzf_select__() {
eval "$cmd" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) "$@" |
while read -r item; do
printf '%q ' "$item" # escape special chars
printf '%q ' "$item" # escape special chars
done
}
if [[ $- =~ i ]]; then
__fzfcmd() {
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
__fzfcmd() {
[[ -n "${TMUX_PANE-}" ]] && { [[ "${FZF_TMUX:-0}" != 0 ]] || [[ -n "${FZF_TMUX_OPTS-}" ]]; } &&
echo "fzf-tmux ${FZF_TMUX_OPTS:--d${FZF_TMUX_HEIGHT:-40%}} -- " || echo "fzf"
}
fzf-file-widget() {
local selected="$(__fzf_select__ "$@")"
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
READLINE_POINT=$(( READLINE_POINT + ${#selected} ))
}
fzf-file-widget() {
local selected="$(__fzf_select__ "$@")"
READLINE_LINE="${READLINE_LINE:0:$READLINE_POINT}$selected${READLINE_LINE:$READLINE_POINT}"
READLINE_POINT=$((READLINE_POINT + ${#selected}))
}
__fzf_cd__() {
local cmd opts dir
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
__fzf_cd__() {
local cmd opts dir
cmd="${FZF_ALT_C_COMMAND:-"command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
-o -type d -print 2> /dev/null | cut -b3-"}"
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
dir=$(set +o pipefail; eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)) && printf 'builtin cd -- %q' "$dir"
}
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore --reverse ${FZF_DEFAULT_OPTS-} ${FZF_ALT_C_OPTS-} +m"
dir=$(
set +o pipefail
eval "$cmd" | FZF_DEFAULT_OPTS="$opts" $(__fzfcmd)
) && printf 'builtin cd -- %q' "$dir"
}
__fzf_history__() {
local output opts script
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
output=$(
set +o pipefail
builtin fc -lnr -2147483648 |
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
) || return
READLINE_LINE=${output#*$'\t'}
if [[ -z "$READLINE_POINT" ]]; then
echo "$READLINE_LINE"
__fzf_history__() {
local output opts script
opts="--height ${FZF_TMUX_HEIGHT:-40%} --bind=ctrl-z:ignore ${FZF_DEFAULT_OPTS-} -n2..,.. --scheme=history --bind=ctrl-r:toggle-sort ${FZF_CTRL_R_OPTS-} +m --read0"
script='BEGIN { getc; $/ = "\n\t"; $HISTCOUNT = $ENV{last_hist} + 1 } s/^[ *]//; print $HISTCOUNT - $. . "\t$_" if !$seen{$_}++'
output=$(
set +o pipefail
builtin fc -lnr -2147483648 |
last_hist=$(HISTTIMEFORMAT='' builtin history 1) perl -n -l0 -e "$script" |
FZF_DEFAULT_OPTS="$opts" $(__fzfcmd) --query "$READLINE_LINE"
) || return
READLINE_LINE=${output#*$'\t'}
if [[ -z "$READLINE_POINT" ]]; then
echo "$READLINE_LINE"
else
READLINE_POINT=0x7fffffff
fi
}
# Required to refresh the prompt after fzf
bind -m emacs-standard '"\er": redraw-current-line'
bind -m vi-command '"\C-z": emacs-editing-mode'
bind -m vi-insert '"\C-z": emacs-editing-mode'
bind -m emacs-standard '"\C-z": vi-editing-mode'
if ((BASH_VERSINFO[0] < 4)); then
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"'
bind -m vi-command '"\C-t": "\C-z\C-t\C-z"'
bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"'
bind -m vi-command '"\C-r": "\C-z\C-r\C-z"'
bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"'
else
READLINE_POINT=0x7fffffff
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard -x '"\C-t": fzf-file-widget'
bind -m vi-command -x '"\C-t": fzf-file-widget'
bind -m vi-insert -x '"\C-t": fzf-file-widget'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard -x '"\C-r": __fzf_history__'
bind -m vi-command -x '"\C-r": __fzf_history__'
bind -m vi-insert -x '"\C-r": __fzf_history__'
fi
}
# Required to refresh the prompt after fzf
bind -m emacs-standard '"\er": redraw-current-line'
bind -m vi-command '"\C-z": emacs-editing-mode'
bind -m vi-insert '"\C-z": emacs-editing-mode'
bind -m emacs-standard '"\C-z": vi-editing-mode'
if (( BASH_VERSINFO[0] < 4 )); then
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard '"\C-t": " \C-b\C-k \C-u`__fzf_select__`\e\C-e\er\C-a\C-y\C-h\C-e\e \C-y\ey\C-x\C-x\C-f"'
bind -m vi-command '"\C-t": "\C-z\C-t\C-z"'
bind -m vi-insert '"\C-t": "\C-z\C-t\C-z"'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard '"\C-r": "\C-e \C-u\C-y\ey\C-u"$(__fzf_history__)"\e\C-e\er"'
bind -m vi-command '"\C-r": "\C-z\C-r\C-z"'
bind -m vi-insert '"\C-r": "\C-z\C-r\C-z"'
else
# CTRL-T - Paste the selected file path into the command line
bind -m emacs-standard -x '"\C-t": fzf-file-widget'
bind -m vi-command -x '"\C-t": fzf-file-widget'
bind -m vi-insert -x '"\C-t": fzf-file-widget'
# CTRL-R - Paste the selected command from history into the command line
bind -m emacs-standard -x '"\C-r": __fzf_history__'
bind -m vi-command -x '"\C-r": __fzf_history__'
bind -m vi-insert -x '"\C-r": __fzf_history__'
fi
# ALT-C - cd into the selected directory
bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'
bind -m vi-command '"\ec": "\C-z\ec\C-z"'
bind -m vi-insert '"\ec": "\C-z\ec\C-z"'
# ALT-C - cd into the selected directory
bind -m emacs-standard '"\ec": " \C-b\C-k \C-u`__fzf_cd__`\e\C-e\er\C-m\C-y\C-h\e \C-y\ey\C-x\C-x\C-d"'
bind -m vi-command '"\ec": "\C-z\ec\C-z"'
bind -m vi-insert '"\ec": "\C-z\ec\C-z"'
fi

View File

@@ -63,3 +63,5 @@
old = red bold
new = green bold
whitespace = red reverse
[coderabbit]
machineId = cli/2d3277ec1da346c4b30b26d0fb373d8c

View File

@@ -51,4 +51,3 @@
# dotfiles special config
[includeIf "hasconfig:remote.*.url:https://github.com/ivuorinen/dotfiles.git"]
path = ~/.dotfiles/config/git/special/dotfiles ;

View File

@@ -1,4 +1,3 @@
set -gx GOENV_PATH_ORDER front
set -gx GOENV_PREPEND_GOPATH true
set -gx GOENV_AUTO_INSTALL true

View File

@@ -29,4 +29,3 @@
# outdir = "~/.gnupg/out"
# outfile = "{type}_{query}.{ext}"
# default_key = "0xA1B2C3XY"

View File

@@ -8,4 +8,3 @@ export HOMEBREW_AUTOREMOVE=true
export HOMEBREW_AUTO_UPDATE_SECS=86400
export HOMEBREW_CLEANUP_MAX_AGE_DAYS=30
export HOMEBREW_NO_ENV_HINTS=1

4
config/husky/init.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/env bash
[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

View File

@@ -226,4 +226,4 @@ if has('gui_running')
set guifont=JetBrainsMono:h14
endif
" vim: set filetype=vim :
" vim: set filetype=vim :

View File

@@ -110,4 +110,3 @@ Irssi::signal_add(
'message kick' => \&msg_kick
}
);

View File

@@ -13,4 +13,3 @@ termcapinfo xterm* ti@:te@
# Some settings for screen + vim
term xterm-256color
maptimeout 10

0
config/nbrc Normal file → Executable file
View File

View File

@@ -21,4 +21,3 @@ max_line_length = off
[*.lua]
max_line_length = 90

View File

@@ -1,3 +1,2 @@
spell/*
!spell/.gitkeep

View File

@@ -8,4 +8,3 @@ collapse_simple_statement = "Always"
[sort_requires]
enabled = true

View File

@@ -65,6 +65,6 @@ vim.schedule(function()
end)
-- xiyaowong/transparent.nvim
-- vim.g.transparent_enabled = true
vim.g.transparent_enabled = true
-- vim: ts=2 sts=2 sw=2 et

View File

@@ -56,9 +56,12 @@ return {
opts = {
snippets = { preset = 'luasnip' },
-- 'default' for mappings similar to built-in completion
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- see the "default configuration" section below for full documentation on how to
-- 'super-tab' for mappings similar to vscode (tab to accept,
-- arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to
-- accept
-- see the "default configuration" section below for
-- documentation on how to
-- define your own keymap.
keymap = {
preset = 'default',

View File

@@ -11,6 +11,27 @@ return {
end,
},
{
'ivuorinen/nvim-shellspec',
ft = 'shellspec',
config = function()
require('shellspec').setup {
auto_format = true,
indent_size = 2,
indent_comments = true,
}
end,
},
{
'pablos123/shellcheck.nvim',
config = function()
require('shellcheck-nvim').setup {
shellcheck_options = { '-x' },
}
end,
},
-- Go development plugin for Vim
-- https://github.com/fatih/vim-go
{

View File

@@ -16,7 +16,8 @@ return {
},
opts = {
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
-- override markdown rendering so that **cmp** and other plugins
-- use **Treesitter**
override = {
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
['vim.lsp.util.stylize_markdown'] = true,

View File

@@ -54,7 +54,9 @@ return {
event_handlers = {
{
event = 'file_opened',
handler = function(_) require('neo-tree.command').execute { action = 'close' } end,
handler = function(_)
require('neo-tree.command').execute { action = 'close' }
end,
},
},
default_component_configs = {

View File

@@ -6,9 +6,9 @@ return {
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
require('everforest').setup {
background = 'soft', -- hard, medium, soft
transparent_background_level = 0, -- 0, 1, 2
sign_column_background = 'none', -- none, dimmed, normal
background = 'medium', -- hard, medium, soft
transparent_background_level = 2, -- 0, 1, 2
sign_column_background = 'grey', -- none, grey
disable_italic_comments = false,
diagnostic_virtual_text = 'coloured', -- coloured, gray, underline, none
diagnostic_line_highlight = true,
@@ -27,26 +27,6 @@ return {
end,
},
-- {
-- 'rose-pine/neovim',
-- name = 'rose-pine',
-- opts = {
-- dim_inactive_windows = false,
-- extend_background_behind_borders = true,
-- styles = {
-- bold = true,
-- italic = true,
-- transparency = true,
-- },
-- enable = {
-- terminal = true,
-- legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
-- migrations = true, -- Handle deprecated options automatically
-- },
-- },
-- config = function() vim.cmd 'colorscheme rose-pine' end,
-- },
-- Automatic dark mode
-- https://github.com/f-person/auto-dark-mode.nvim
{
@@ -80,35 +60,37 @@ return {
-- Remove all background colors to make nvim transparent
-- https://github.com/xiyaowong/nvim-transparent
-- {
-- 'xiyaowong/nvim-transparent',
-- lazy = false,
-- enabled = false,
-- config = function()
-- local t = require 'transparent'
-- t.setup {
-- extra_groups = {
-- 'NormalNC',
-- 'NormalFloat',
-- 'FloatTitle',
-- 'FloatBorder',
-- 'NotifyDEBUGBorder',
-- 'NotifyERRORBorder',
-- 'NotifyINFOBorder',
-- 'NotifyINFOBorder73',
-- 'NotifyINFOBorder75',
-- 'NotifyINFOBorder101',
-- 'NotifyTRACEBorder',
-- 'NotifyWARNBorder',
-- 'TelescopeBorder',
-- 'TelescopePromptBorder',
-- 'TelescopeResultsBorder',
-- 'TelescopePreviewBorder',
-- },
-- }
-- t.clear_prefix 'NeoTree'
-- end,
-- },
{
'xiyaowong/nvim-transparent',
lazy = false,
enabled = true,
config = function()
local t = require 'transparent'
t.setup {
extra_groups = {
'NormalNC',
'NormalFloat',
'EndOfBuffer',
'FloatTitle',
'FloatBorder',
'NotifyDEBUGBorder',
'NotifyERRORBorder',
'NotifyINFOBorder',
'NotifyINFOBorder73',
'NotifyINFOBorder75',
'NotifyINFOBorder101',
'NotifyTRACEBorder',
'NotifyWARNBorder',
'NotifyBackground',
'TelescopeBorder',
'TelescopePromptBorder',
'TelescopeResultsBorder',
'TelescopePreviewBorder',
},
}
t.clear_prefix 'NeoTree'
end,
},
-- Display a character as the colorcolumn
-- https://github.com/lukas-reineke/virt-column.nvim

View File

@@ -199,7 +199,7 @@
"progress bar": {
"body": [
"for _ in {1..100}; do",
"\tprintf \"🬋\"",
"\tprintf \"\ud83e\udf0b\"",
"\tsleep 0.5",
"done"
],
@@ -242,7 +242,7 @@
"spinner": {
"body": [
"# spinner with 20s timeout",
"spinner=\"⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏\"",
"spinner=\"\u280b\u2819\u2839\u2838\u283c\u2834\u2826\u2827\u2807\u280f\"",
"for i in {1..100}; do",
"\tpos=\\$((i % \\${#spinner}))",
"\tprintf \"\\r%s\" \"\\${spinner:\\$pos:1}\"",

View File

@@ -1,6 +1,8 @@
{
"account_id": "S5Z2DMNFKJEZBPCWRHRWC4DCGI",
"entrypoint": ["gh"],
"entrypoint": [
"gh"
],
"credentials": [
{
"plugin": "github",

View File

@@ -102,4 +102,3 @@ ctrl + alt - k : \
ctrl + alt - l : \
yabai -m window --resize right:50:0; \
yabai -m window --resize left:50:0

View File

@@ -152,4 +152,3 @@ format = "[$virtualenv]($style) "
[username]
format = "[$user]($style) "

View File

@@ -1,2 +1 @@
plugin_cache_dir = "$HOME/.cache/terraform/plugin-cache"

View File

@@ -1,93 +1,46 @@
# set-option -g status-style 'fg=#cad3f5,bg=default'
# set-window-option -g window-status-style 'fg=#cad3f5,bg=default dim'
# set-window-option -g window-status-current-style 'fg=#04a5e5,bg=default'
# set-window-option -g window-status-activity-style 'fg=#cad3f5,bg=default nodim'
# set-window-option -g window-status-bell-style 'fg=#cad3f5,bg=default'
# set -g message-style 'fg=#c6a0f6 bg=#24273a bold'
# Everforest dark theme for tmux
# Generated from template - do not edit manually
## COLORSCHEME: everforest dark medium
set -g @everforest_bg_dim '#efebd4 '
set -g @everforest_bg0 '#fdf6e3 '
set -g @everforest_bg1 '#f6f0d9'
set -g @everforest_bg2 '#efebd4'
set -g @everforest_bg3 '#e6e2cc'
set -g @everforest_bg4 '#e0dcc7'
set -g @everforest_bg5 '#bdc3af'
set -g @everforest_bg_visual '#eaedc8'
set -g @everforest_bg_red '#fbe3da'
set -g @everforest_bg_green '#f0f1d2'
set -g @everforest_bg_blue '#e9f0e9'
set -g @everforest_bg_yellow '#faedcd'
# Enable proper color support
set -g default-terminal "tmux-256color"
set -as terminal-features ",*:RGB"
set -g @everforest_fg '#5c6a72'
set -g @everforest_red '#f85552'
set -g @everforest_orange '#f57d26'
set -g @everforest_yellow '#dfa000'
set -g @everforest_green '#8da101'
set -g @everforest_aqua '#35a77c'
set -g @everforest_blue '#3a94c5'
set -g @everforest_purple '#df69ba'
set -g @everforest_grey0 '#a6b0a0'
set -g @everforest_grey1 '#939f91'
set -g @everforest_grey2 '#829181'
set -g @everforest_statusline1 '#93b259'
set -g @everforest_statusline2 '#708089'
set -g @everforest_statusline3 '#e66868'
set -g pane-border-style "bg=default,fg=#859289"
set -g pane-active-border-style "bg=default,fg=#a7c080"
set-option -g status "on"
set -g status-interval 2
# Window tabs
set -g window-style "bg=default,fg=default,dim"
set -g window-status-style "bg=default,fg=default,dim"
set -g window-status-current-style "bg=default,fg=#d3c6aa"
set -g window-status-activity-style "bg=default,fg=#dbbc7f,nodim"
set -g window-status-bell-style "bg=default,fg=yellow,nodim"
set -g window-status-last-style "bg=default,fg=#a7c080"
set -g window-status-format " #I:#W "
set-option -g status-fg '#5c6a72' # fg (No idea why I can't use variables here)
set-option -g status-bg '#fdf6e4' # bg0
# Messages
set -g message-style "bg=default,fg=#d3c6aa"
set -g message-command-style "bg=default,fg=#d3c6aa"
set-option -g mode-style fg='#{@everforest_purple}',bg='#{@everforest_bg_red}' # fg=purple, bg=bg_visual
# Status bar
set -g status-style "bg=default,fg=default"
set -g status-left " #[default]"
set -g status-right " #[fg=#a7c080]#S@#[fg=#859289]#h #[fg=#7fbbb3]%H:%M #[fg=#dbbc7f]%d.%m "
set -g status-left-style "bg=default,fg=white"
set -g status-right-style "bg=default,fg=white"
# default statusbar colors
set-option -g status-style fg='#{@everforest_fg}',bg='#{@everforest_bg_dim}',default # fg=fg bg=bg_dim
set -g menu-style "bg=default,fg=white"
set -g menu-selected-style "bg=default,fg=#a7c080"
set -g menu-border-style "fg=#a7c080"
set -g menu-border-lines "single"
# ---- Windows ----
# default window title colors
set-window-option -g window-status-style fg='#{@everforest_bg5}',bg='#{@everforest_bg0}' # fg=yellow bg=bg0
set -g popup-style "bg=default,fg=white"
set -g popup-border-style "fg=#a7c080"
set -g popup-border-lines "single"
# default window with an activity alert
set-window-option -g window-status-activity-style 'bg=#{@everforest_bg1},fg=#{@everforest_bg3}' # bg=bg1, fg=fg3
# active window title colors
set-window-option -g window-status-current-style fg='#{@everforest_fg}',bg='#{@everforest_bg_green}' # fg=fg bg=bg_green
# ---- Pane ----
# pane borders
set-option -g pane-border-style fg='#{@everforest_bg1}' # fg=bg1
set-option -g pane-active-border-style 'fg=#{@everforest_blue}' # fg=blue
# pane number display
set-option -g display-panes-active-colour '#3a9c53' # blue
set-option -g display-panes-colour '#f57d26' # orange
# ---- Command ----
# message info
set-option -g message-style fg='#{@everforest_statusline3}',bg='#{@everforest_bg_dim}' # fg=statusline3 bg=bg_dim
# writing commands inactive
set-option -g message-command-style 'fg=#{@everforest_bg3},bg=#{@everforest_bg1}' # bg=fg3, fg=bg1
# ---- Miscellaneous ----
# clock
set-window-option -g clock-mode-colour '#3a9c53' #blue
# bell
set-window-option -g window-status-bell-style fg='#{@everforest_bg0}',bg='#{@everforest_statusline3}' # fg=bg, bg=statusline3
# ---- Formatting ----
set-option -g status-left-style none
set -g status-left-length 60
set -g status-left '#[fg=#{@everforest_bg_dim},bg=#{@everforest_green},bold] #S #[fg=#{@everforest_green},bg=#{@everforest_bg2},nobold]#[fg=#{@everforest_green},bg=#{@everforest_bg2},bold] #(whoami) #[fg=#{@everforest_bg2},bg=#{@everforest_bg0},nobold]'
set-option -g status-right-style none
set -g status-right-length 150
set -g status-right '#[fg=#{@everforest_bg2}]#[fg=#{@everforest_fg},bg=#{@everforest_bg2}] #[fg=#{@everforest_fg},bg=#{@everforest_bg2}]%Y-%m-%d  %H:%M #[fg=#{@everforest_aqua},bg=#{@everforest_bg2},bold]#[fg=#{@everforest_bg_dim},bg=#{@everforest_aqua},bold] #h '
set -g window-status-separator '#[fg=#{@everforest_grey2},bg=#{@everforest_bg0}] '
set -g window-status-format "#[fg=#{@everforest_grey0},bg=#{@everforest_bg0}] #I  #[fg=#{@everforest_grey0},bg=#{@everforest_bg0}]#W "
set -g window-status-current-format "#[fg=#{@everforest_bg0},bg=#{@everforest_bg_green}]#[fg=#{@everforest_fg},bg=#{@everforest_bg_green}] #I  #[fg=#{@everforest_fg},bg=#{@everforest_bg_green},bold]#W #[fg=#{@everforest_bg_green},bg=#{@everforest_bg0},nobold]"
set -g display-panes-colour "blue"
set -g display-panes-active-colour "red"
set -g display-panes-time 1000 # milliseconds
set -g pane-border-indicators "arrows"
set -g pane-border-lines "single"
set -g clock-mode-style "24"

View File

@@ -1,93 +1,6 @@
# set-option -g status-style 'fg=#4c4f69,bg=default'
# set-window-option -g window-status-style 'fg=#4c4f69,bg=default dim'
# set-window-option -g window-status-current-style 'fg=#8839ef,bg=default'
# set-window-option -g window-status-activity-style 'fg=#4c4f69,bg=default nodim'
# set-window-option -g window-status-bell-style 'fg=#4c4f69,bg=default'
# set -g message-style 'fg=#8839ef bg=#e6e9ef bold' # fg magenta, bg black
## COLORSCHEME: everforest light medium
set -g @everforest_bg_dim '#e5dfc5'
set -g @everforest_bg0 '#f3ead3'
set -g @everforest_bg1 '#eae4ca'
set -g @everforest_bg2 '#e5dfc5'
set -g @everforest_bg3 '#ddd8be'
set -g @everforest_bg4 '#d8d3ba'
set -g @everforest_bg5 '#b9c0ab'
set -g @everforest_bg_visual '#e1e4b0'
set -g @everforest_bg_red '#f4dbd0'
set -g @everforest_bg_green '#e5e6c5'
set -g @everforest_bg_blue '#e1e7dd'
set -g @everforest_bg_yellow '#f1e4c5'
set -g @everforest_fg '#5c6a72'
set -g @everforest_red '#f85552'
set -g @everforest_orange '#f57d26'
set -g @everforest_yellow '#dfa000'
set -g @everforest_green '#8da101'
set -g @everforest_aqua '#35a77c'
set -g @everforest_blue '#3a94c5'
set -g @everforest_purple '#df69ba'
set -g @everforest_grey0 '#a6b0a0'
set -g @everforest_grey1 '#939f91'
set -g @everforest_grey2 '#829181'
set -g @everforest_statusline1 '#93b259'
set -g @everforest_statusline2 '#708089'
set -g @everforest_statusline3 '#e66868'
set-option -g status "on"
set -g status-interval 2
set-option -g status-fg '#5c6a72' # fg (No idea why I can't use variables here)
set-option -g status-bg '#f3ead3' # bg0
set-option -g mode-style fg='#{@everforest_purple}',bg='#{@everforest_bg_red}' # fg=purple, bg=bg_visual
# default statusbar colors
set-option -g status-style fg='#{@everforest_fg}',bg='#{@everforest_bg_dim}',default # fg=fg bg=bg_dim
# ---- Windows ----
# default window title colors
set-window-option -g window-status-style fg='#{@everforest_bg5}',bg='#{@everforest_bg0}' # fg=yellow bg=bg0
# default window with an activity alert
set-window-option -g window-status-activity-style 'bg=#{@everforest_bg1},fg=#{@everforest_bg3}' # bg=bg1, fg=fg3
# active window title colors
set-window-option -g window-status-current-style fg='#{@everforest_fg}',bg='#{@everforest_bg_green}' # fg=fg bg=bg_green
# ---- Pane ----
# pane borders
set-option -g pane-border-style fg='#{@everforest_bg1}' # fg=bg1
set-option -g pane-active-border-style 'fg=#{@everforest_blue}' # fg=blue
# pane number display
set-option -g display-panes-active-colour '#3a9c53' # blue
set-option -g display-panes-colour '#f57d26' # orange
# ---- Command ----
# message info
set-option -g message-style fg='#{@everforest_statusline3}',bg='#{@everforest_bg_dim}' # fg=statusline3 bg=bg_dim
# writing commands inactive
set-option -g message-command-style 'fg=#{@everforest_bg3},bg=#{@everforest_bg1}' # bg=fg3, fg=bg1
# ---- Miscellaneous ----
# clock
set-window-option -g clock-mode-colour '#3a9c53' #blue
# bell
set-window-option -g window-status-bell-style fg='#{@everforest_bg0}',bg='#{@everforest_statusline3}' # fg=bg, bg=statusline3
# ---- Formatting ----
set-option -g status-left-style none
set -g status-left-length 60
set -g status-left '#[fg=#{@everforest_bg_dim},bg=#{@everforest_green},bold] #S #[fg=#{@everforest_green},bg=#{@everforest_bg2},nobold]#[fg=#{@everforest_green},bg=#{@everforest_bg2},bold] #(whoami) #[fg=#{@everforest_bg2},bg=#{@everforest_bg0},nobold]'
set-option -g status-right-style none
set -g status-right-length 150
set -g status-right '#[fg=#{@everforest_bg2}]#[fg=#{@everforest_fg},bg=#{@everforest_bg2}] #[fg=#{@everforest_fg},bg=#{@everforest_bg2}]%Y-%m-%d  %H:%M #[fg=#{@everforest_aqua},bg=#{@everforest_bg2},bold]#[fg=#{@everforest_bg_dim},bg=#{@everforest_aqua},bold] #h '
set -g window-status-separator '#[fg=#{@everforest_grey2},bg=#{@everforest_bg0}] '
set -g window-status-format "#[fg=#{@everforest_grey0},bg=#{@everforest_bg0}] #I  #[fg=#{@everforest_grey0},bg=#{@everforest_bg0}]#W "
set -g window-status-current-format "#[fg=#{@everforest_bg0},bg=#{@everforest_bg_green}]#[fg=#{@everforest_fg},bg=#{@everforest_bg_green}] #I  #[fg=#{@everforest_fg},bg=#{@everforest_bg_green},bold]#W #[fg=#{@everforest_bg_green},bg=#{@everforest_bg0},nobold]"
set-option -g status-style 'fg=#4c4f69,bg=default'
set-window-option -g window-status-style 'fg=#4c4f69,bg=default dim'
set-window-option -g window-status-current-style 'fg=#8839ef,bg=default'
set-window-option -g window-status-activity-style 'fg=#4c4f69,bg=default nodim'
set-window-option -g window-status-bell-style 'fg=#4c4f69,bg=default'
set -g message-style 'fg=#8839ef bg=#e6e9ef bold' # fg magenta, bg black

View File

@@ -51,8 +51,8 @@ if-shell '[ "$DEBUG" = "1" ]' 'set -g debug-file ~/.cache/tmux-debug.log'
# │ Theme │
# ╰──────────────────────────────────────────────────────────╯
set -g pane-active-border-style "fg=#7aa2f7"
set -g pane-border-style "fg=#31748f"
set -g pane-active-border-style "bg=default,fg=#7aa2f7"
set -g pane-border-style "bg=default,fg=#31748f"
set -g status-style "bg=default"
set -g status-justify "left"
set -g status-left ''
@@ -190,4 +190,4 @@ run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-fzf-url/fzf-url.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
# run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-dark-notify/main.tmux"
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-dark-notify/main.tmux"

View File

@@ -4,7 +4,7 @@
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/"

View File

@@ -1 +1 @@
en_US
en_US

View File

@@ -1,24 +1,24 @@
[colors]
ansi = [
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
]
background = '#2d353b'
brights = [
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
'#475258',
'#e67e80',
'#a7c080',
'#dbbc7f',
'#7fbbb3',
'#d699b6',
'#83c092',
'#d3c6aa',
]
cursor_bg = '#d3c6aa'
cursor_border = '#d3c6aa'

View File

@@ -1,24 +1,24 @@
[colors]
ansi = [
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
]
background = '#fdf6e3'
brights = [
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
'#5c6a72',
'#f85552',
'#8da101',
'#dfa000',
'#3a94c5',
'#df69ba',
'#35a77c',
'#e0dcc7',
]
cursor_bg = '#5c6a72'
cursor_border = '#5c6a72'

View File

@@ -12,6 +12,10 @@ config.color_scheme_dirs = {
-- Font and font size
config.font_size = 16
config.font = wezterm.font_with_fallback {
{
family = 'Monaspace Argon NF',
weight = 'Regular',
},
{
family = 'Operator Mono',
weight = 'Book',
@@ -22,7 +26,20 @@ config.font = wezterm.font_with_fallback {
'Symbols Nerd Font Mono',
}
config.font_shaper = 'Harfbuzz'
config.harfbuzz_features = { 'calt=1', 'clig=1', 'liga=1' }
config.harfbuzz_features = {
'calt=1',
'clig=1',
'liga=1',
'ss01=1',
'ss02=1',
'ss03=1',
'ss04=1',
'ss05=1',
'ss06=1',
'ss07=1',
'ss08=1',
'ss09=1',
}
config.selection_word_boundary = ' \t\n{[}]()"\'`,;:'

View File

@@ -29,4 +29,3 @@ rules:
allow-non-breakable-inline-mappings: true
max: 120
truthy: disable

View File

@@ -24,4 +24,3 @@ load-nvmrc() {
add-zsh-hook chpwd load-nvmrc
load-nvmrc