mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-02 21:48:12 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a776bd3dd | |||
| 6ffe581326 | |||
| 5d476e8eed | |||
|
|
bf84c67f08 | ||
| 9cb400dd3f | |||
| fce649619a | |||
| 8b0148e468 | |||
| 9cb27eb9dc | |||
| f1ed88a98e | |||
| ec35f1cb1e | |||
| dab8504cfd | |||
| 0f9a76e36f | |||
|
|
97244d5287 | ||
| 50ea9bea89 | |||
| 688469ad8b | |||
|
|
af32914d71 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -45,3 +45,4 @@ config/fish/completions/asdf.fish
|
|||||||
config/vim/.netrwhist
|
config/vim/.netrwhist
|
||||||
config/vim/extra/*
|
config/vim/extra/*
|
||||||
config/gh/hosts.yml
|
config/gh/hosts.yml
|
||||||
|
dependency-check-report.html
|
||||||
|
|||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -80,3 +80,6 @@
|
|||||||
shallow = true
|
shallow = true
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
|
|
||||||
|
[submodule "tmux/tmux-resurrect"]
|
||||||
|
path = config/tmux/plugins/tmux-resurrect
|
||||||
|
url = https://github.com/tmux-plugins/tmux-resurrect.git
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ repos:
|
|||||||
- id: actionlint
|
- id: actionlint
|
||||||
|
|
||||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||||
rev: 39.212.0
|
rev: 39.227.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: renovate-config-validator
|
- id: renovate-config-validator
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ git submodule add --name tmux/tmux-continuum \
|
|||||||
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
||||||
git submodule add --name tmux/tmux-mode-indicator \
|
git submodule add --name tmux/tmux-mode-indicator \
|
||||||
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
||||||
|
git submodule add --name tmux/tmux-resurrect \
|
||||||
|
-f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/tmux-resurrect
|
||||||
git submodule add --name tmux/tmux-sensible \
|
git submodule add --name tmux/tmux-sensible \
|
||||||
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
||||||
git submodule add --name tmux/tmux-sessionist \
|
git submodule add --name tmux/tmux-sessionist \
|
||||||
@@ -55,7 +57,6 @@ folders=(
|
|||||||
"config/tmux/plugins/tpm"
|
"config/tmux/plugins/tpm"
|
||||||
"config/tmux/plugins/tmux"
|
"config/tmux/plugins/tmux"
|
||||||
"config/tmux/plugins/tmux-menus"
|
"config/tmux/plugins/tmux-menus"
|
||||||
"config/tmux/plugins/tmux-resurrect"
|
|
||||||
"tools/dotbot-crontab"
|
"tools/dotbot-crontab"
|
||||||
"tools/dotbot-snap"
|
"tools/dotbot-snap"
|
||||||
"config/nvim-kickstart"
|
"config/nvim-kickstart"
|
||||||
|
|||||||
235
config/fish/completions/docker.fish
Executable file
235
config/fish/completions/docker.fish
Executable file
@@ -0,0 +1,235 @@
|
|||||||
|
# fish completion for docker -*- shell-script -*-
|
||||||
|
|
||||||
|
function __docker_debug
|
||||||
|
set -l file "$BASH_COMP_DEBUG_FILE"
|
||||||
|
if test -n "$file"
|
||||||
|
echo "$argv" >> $file
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __docker_perform_completion
|
||||||
|
__docker_debug "Starting __docker_perform_completion"
|
||||||
|
|
||||||
|
# Extract all args except the last one
|
||||||
|
set -l args (commandline -opc)
|
||||||
|
# Extract the last arg and escape it in case it is a space
|
||||||
|
set -l lastArg (string escape -- (commandline -ct))
|
||||||
|
|
||||||
|
__docker_debug "args: $args"
|
||||||
|
__docker_debug "last arg: $lastArg"
|
||||||
|
|
||||||
|
# Disable ActiveHelp which is not supported for fish shell
|
||||||
|
set -l requestComp "DOCKER_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
|
||||||
|
|
||||||
|
__docker_debug "Calling $requestComp"
|
||||||
|
set -l results (eval $requestComp 2> /dev/null)
|
||||||
|
|
||||||
|
# Some programs may output extra empty lines after the directive.
|
||||||
|
# Let's ignore them or else it will break completion.
|
||||||
|
# Ref: https://github.com/spf13/cobra/issues/1279
|
||||||
|
for line in $results[-1..1]
|
||||||
|
if test (string trim -- $line) = ""
|
||||||
|
# Found an empty line, remove it
|
||||||
|
set results $results[1..-2]
|
||||||
|
else
|
||||||
|
# Found non-empty line, we have our proper output
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l comps $results[1..-2]
|
||||||
|
set -l directiveLine $results[-1]
|
||||||
|
|
||||||
|
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
|
||||||
|
# completions must be prefixed with the flag
|
||||||
|
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
|
||||||
|
|
||||||
|
__docker_debug "Comps: $comps"
|
||||||
|
__docker_debug "DirectiveLine: $directiveLine"
|
||||||
|
__docker_debug "flagPrefix: $flagPrefix"
|
||||||
|
|
||||||
|
for comp in $comps
|
||||||
|
printf "%s%s\n" "$flagPrefix" "$comp"
|
||||||
|
end
|
||||||
|
|
||||||
|
printf "%s\n" "$directiveLine"
|
||||||
|
end
|
||||||
|
|
||||||
|
# this function limits calls to __docker_perform_completion, by caching the result behind $__docker_perform_completion_once_result
|
||||||
|
function __docker_perform_completion_once
|
||||||
|
__docker_debug "Starting __docker_perform_completion_once"
|
||||||
|
|
||||||
|
if test -n "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "Seems like a valid result already exists, skipping __docker_perform_completion"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set --global __docker_perform_completion_once_result (__docker_perform_completion)
|
||||||
|
if test -z "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "No completions, probably due to a failure"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
__docker_debug "Performed completions and set __docker_perform_completion_once_result"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
# this function is used to clear the $__docker_perform_completion_once_result variable after completions are run
|
||||||
|
function __docker_clear_perform_completion_once_result
|
||||||
|
__docker_debug ""
|
||||||
|
__docker_debug "========= clearing previously set __docker_perform_completion_once_result variable =========="
|
||||||
|
set --erase __docker_perform_completion_once_result
|
||||||
|
__docker_debug "Successfully erased the variable __docker_perform_completion_once_result"
|
||||||
|
end
|
||||||
|
|
||||||
|
function __docker_requires_order_preservation
|
||||||
|
__docker_debug ""
|
||||||
|
__docker_debug "========= checking if order preservation is required =========="
|
||||||
|
|
||||||
|
__docker_perform_completion_once
|
||||||
|
if test -z "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "Error determining if order preservation is required"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l directive (string sub --start 2 $__docker_perform_completion_once_result[-1])
|
||||||
|
__docker_debug "Directive is: $directive"
|
||||||
|
|
||||||
|
set -l shellCompDirectiveKeepOrder 32
|
||||||
|
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
|
||||||
|
__docker_debug "Keeporder is: $keeporder"
|
||||||
|
|
||||||
|
if test $keeporder -ne 0
|
||||||
|
__docker_debug "This does require order preservation"
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
__docker_debug "This doesn't require order preservation"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# This function does two things:
|
||||||
|
# - Obtain the completions and store them in the global __docker_comp_results
|
||||||
|
# - Return false if file completion should be performed
|
||||||
|
function __docker_prepare_completions
|
||||||
|
__docker_debug ""
|
||||||
|
__docker_debug "========= starting completion logic =========="
|
||||||
|
|
||||||
|
# Start fresh
|
||||||
|
set --erase __docker_comp_results
|
||||||
|
|
||||||
|
__docker_perform_completion_once
|
||||||
|
__docker_debug "Completion results: $__docker_perform_completion_once_result"
|
||||||
|
|
||||||
|
if test -z "$__docker_perform_completion_once_result"
|
||||||
|
__docker_debug "No completion, probably due to a failure"
|
||||||
|
# Might as well do file completion, in case it helps
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l directive (string sub --start 2 $__docker_perform_completion_once_result[-1])
|
||||||
|
set --global __docker_comp_results $__docker_perform_completion_once_result[1..-2]
|
||||||
|
|
||||||
|
__docker_debug "Completions are: $__docker_comp_results"
|
||||||
|
__docker_debug "Directive is: $directive"
|
||||||
|
|
||||||
|
set -l shellCompDirectiveError 1
|
||||||
|
set -l shellCompDirectiveNoSpace 2
|
||||||
|
set -l shellCompDirectiveNoFileComp 4
|
||||||
|
set -l shellCompDirectiveFilterFileExt 8
|
||||||
|
set -l shellCompDirectiveFilterDirs 16
|
||||||
|
|
||||||
|
if test -z "$directive"
|
||||||
|
set directive 0
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
|
||||||
|
if test $compErr -eq 1
|
||||||
|
__docker_debug "Received error directive: aborting."
|
||||||
|
# Might as well do file completion, in case it helps
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
|
||||||
|
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
|
||||||
|
if test $filefilter -eq 1; or test $dirfilter -eq 1
|
||||||
|
__docker_debug "File extension filtering or directory filtering not supported"
|
||||||
|
# Do full file completion instead
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
|
||||||
|
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
|
||||||
|
|
||||||
|
__docker_debug "nospace: $nospace, nofiles: $nofiles"
|
||||||
|
|
||||||
|
# If we want to prevent a space, or if file completion is NOT disabled,
|
||||||
|
# we need to count the number of valid completions.
|
||||||
|
# To do so, we will filter on prefix as the completions we have received
|
||||||
|
# may not already be filtered so as to allow fish to match on different
|
||||||
|
# criteria than the prefix.
|
||||||
|
if test $nospace -ne 0; or test $nofiles -eq 0
|
||||||
|
set -l prefix (commandline -t | string escape --style=regex)
|
||||||
|
__docker_debug "prefix: $prefix"
|
||||||
|
|
||||||
|
set -l completions (string match -r -- "^$prefix.*" $__docker_comp_results)
|
||||||
|
set --global __docker_comp_results $completions
|
||||||
|
__docker_debug "Filtered completions are: $__docker_comp_results"
|
||||||
|
|
||||||
|
# Important not to quote the variable for count to work
|
||||||
|
set -l numComps (count $__docker_comp_results)
|
||||||
|
__docker_debug "numComps: $numComps"
|
||||||
|
|
||||||
|
if test $numComps -eq 1; and test $nospace -ne 0
|
||||||
|
# We must first split on \t to get rid of the descriptions to be
|
||||||
|
# able to check what the actual completion will be.
|
||||||
|
# We don't need descriptions anyway since there is only a single
|
||||||
|
# real completion which the shell will expand immediately.
|
||||||
|
set -l split (string split --max 1 \t $__docker_comp_results[1])
|
||||||
|
|
||||||
|
# Fish won't add a space if the completion ends with any
|
||||||
|
# of the following characters: @=/:.,
|
||||||
|
set -l lastChar (string sub -s -1 -- $split)
|
||||||
|
if not string match -r -q "[@=/:.,]" -- "$lastChar"
|
||||||
|
# In other cases, to support the "nospace" directive we trick the shell
|
||||||
|
# by outputting an extra, longer completion.
|
||||||
|
__docker_debug "Adding second completion to perform nospace directive"
|
||||||
|
set --global __docker_comp_results $split[1] $split[1].
|
||||||
|
__docker_debug "Completions are now: $__docker_comp_results"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test $numComps -eq 0; and test $nofiles -eq 0
|
||||||
|
# To be consistent with bash and zsh, we only trigger file
|
||||||
|
# completion when there are no other completions
|
||||||
|
__docker_debug "Requesting file completion"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
|
||||||
|
# so we can properly delete any completions provided by another script.
|
||||||
|
# Only do this if the program can be found, or else fish may print some errors; besides,
|
||||||
|
# the existing completions will only be loaded if the program can be found.
|
||||||
|
if type -q "docker"
|
||||||
|
# The space after the program name is essential to trigger completion for the program
|
||||||
|
# and not completion of the program name itself.
|
||||||
|
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
|
||||||
|
complete --do-complete "docker " > /dev/null 2>&1
|
||||||
|
end
|
||||||
|
|
||||||
|
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||||
|
complete -c docker -e
|
||||||
|
|
||||||
|
# this will get called after the two calls below and clear the $__docker_perform_completion_once_result global
|
||||||
|
complete -c docker -n '__docker_clear_perform_completion_once_result'
|
||||||
|
# The call to __docker_prepare_completions will setup __docker_comp_results
|
||||||
|
# which provides the program's completion choices.
|
||||||
|
# If this doesn't require order preservation, we don't use the -k flag
|
||||||
|
complete -c docker -n 'not __docker_requires_order_preservation && __docker_prepare_completions' -f -a '$__docker_comp_results'
|
||||||
|
# otherwise we use the -k flag
|
||||||
|
complete -k -c docker -n '__docker_requires_order_preservation && __docker_prepare_completions' -f -a '$__docker_comp_results'
|
||||||
@@ -22,4 +22,5 @@ type -q rbenv; and source (rbenv init -|psub)
|
|||||||
type -q pyenv; and source (pyenv init -|psub)
|
type -q pyenv; and source (pyenv init -|psub)
|
||||||
type -q goenv; and source (goenv init -|psub)
|
type -q goenv; and source (goenv init -|psub)
|
||||||
type -q fnm; and fnm env --use-on-cd --shell fish | source
|
type -q fnm; and fnm env --use-on-cd --shell fish | source
|
||||||
|
type -q load_nvm; and load_nvm > /dev/stderr
|
||||||
|
|
||||||
|
|||||||
@@ -121,9 +121,6 @@ set -q OP_CACHE; or set -x OP_CACHE "$XDG_STATE_HOME/1password"
|
|||||||
set -q WORKON_HOME; or set -x WORKON_HOME "$XDG_DATA_HOME/virtualenvs"
|
set -q WORKON_HOME; or set -x WORKON_HOME "$XDG_DATA_HOME/virtualenvs"
|
||||||
set -q PYENV_ROOT; or set -x PYENV_ROOT "$XDG_DATA_HOME/pyenv"
|
set -q PYENV_ROOT; or set -x PYENV_ROOT "$XDG_DATA_HOME/pyenv"
|
||||||
fish_add_path "$PYENV_ROOT/bin"
|
fish_add_path "$PYENV_ROOT/bin"
|
||||||
if x-have pyenv; and not functions -q pyenv
|
|
||||||
status --is-interactive; and source (pyenv init - | psub)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Poetry configuration
|
# Poetry configuration
|
||||||
set -q POETRY_HOME; or set -x POETRY_HOME "$XDG_DATA_HOME/poetry"
|
set -q POETRY_HOME; or set -x POETRY_HOME "$XDG_DATA_HOME/poetry"
|
||||||
|
|||||||
16
config/fish/functions/load_nvm.fish
Normal file
16
config/fish/functions/load_nvm.fish
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
function load_nvm --on-variable="PWD"
|
||||||
|
set -l default_node_version (nvm version default)
|
||||||
|
set -l node_version (nvm version)
|
||||||
|
set -l nvmrc_path (nvm_find_nvmrc)
|
||||||
|
if test -n "$nvmrc_path"
|
||||||
|
set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
|
||||||
|
if test "$nvmrc_node_version" = "N/A"
|
||||||
|
nvm install (cat $nvmrc_path)
|
||||||
|
else if test "$nvmrc_node_version" != "$node_version"
|
||||||
|
nvm use $nvmrc_node_version
|
||||||
|
end
|
||||||
|
else if test "$node_version" != "$default_node_version"
|
||||||
|
echo "Reverting to default Node version"
|
||||||
|
nvm use default
|
||||||
|
end
|
||||||
|
end
|
||||||
4
config/fish/functions/nvm.fish
Normal file
4
config/fish/functions/nvm.fish
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
function nvm
|
||||||
|
bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv
|
||||||
|
end
|
||||||
|
|
||||||
3
config/fish/functions/nvm_find_nvmrc.fish
Normal file
3
config/fish/functions/nvm_find_nvmrc.fish
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
function nvm_find_nvmrc
|
||||||
|
bass source $NVM_DIR/nvm.sh --no-use ';' nvm_find_nvmrc
|
||||||
|
end
|
||||||
@@ -107,6 +107,10 @@ brew "choose-rust"
|
|||||||
brew "cmake"
|
brew "cmake"
|
||||||
# Get a file from an HTTP, HTTPS or FTP server
|
# Get a file from an HTTP, HTTPS or FTP server
|
||||||
brew "curl"
|
brew "curl"
|
||||||
|
# OpenType text shaping engine
|
||||||
|
brew "harfbuzz"
|
||||||
|
# OWASP dependency-check
|
||||||
|
brew "dependency-check"
|
||||||
# Lightweight DNS forwarder and DHCP server
|
# Lightweight DNS forwarder and DHCP server
|
||||||
brew "dnsmasq"
|
brew "dnsmasq"
|
||||||
# .NET Core
|
# .NET Core
|
||||||
@@ -121,8 +125,6 @@ brew "figlet"
|
|||||||
brew "fish"
|
brew "fish"
|
||||||
# Lock file during command
|
# Lock file during command
|
||||||
brew "flock"
|
brew "flock"
|
||||||
# Fast and simple Node.js version manager
|
|
||||||
brew "fnm"
|
|
||||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||||
brew "freetds"
|
brew "freetds"
|
||||||
# Monitor a directory for changes and run a shell command
|
# Monitor a directory for changes and run a shell command
|
||||||
@@ -135,8 +137,6 @@ brew "gd"
|
|||||||
brew "gdu"
|
brew "gdu"
|
||||||
# GitHub command-line tool
|
# GitHub command-line tool
|
||||||
brew "gh"
|
brew "gh"
|
||||||
# OpenType text shaping engine
|
|
||||||
brew "harfbuzz"
|
|
||||||
# Secure hashing function
|
# Secure hashing function
|
||||||
brew "libb2"
|
brew "libb2"
|
||||||
# Framework for layout and rendering of i18n text
|
# Framework for layout and rendering of i18n text
|
||||||
@@ -193,6 +193,8 @@ brew "jq"
|
|||||||
brew "json-c"
|
brew "json-c"
|
||||||
# Network authentication protocol
|
# Network authentication protocol
|
||||||
brew "krb5"
|
brew "krb5"
|
||||||
|
# Style and grammar checker
|
||||||
|
brew "languagetool"
|
||||||
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
|
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
|
||||||
brew "legitify"
|
brew "legitify"
|
||||||
# BSD-style licensed readline alternative
|
# BSD-style licensed readline alternative
|
||||||
@@ -230,7 +232,9 @@ brew "openldap"
|
|||||||
# ISO-C API and CLI for generating UUIDs
|
# ISO-C API and CLI for generating UUIDs
|
||||||
brew "ossp-uuid"
|
brew "ossp-uuid"
|
||||||
# General-purpose scripting language
|
# General-purpose scripting language
|
||||||
brew "php@8.2", link: true
|
brew "php"
|
||||||
|
# General-purpose scripting language
|
||||||
|
brew "php@8.2"
|
||||||
# General-purpose scripting language
|
# General-purpose scripting language
|
||||||
brew "php@8.3"
|
brew "php@8.3"
|
||||||
# Pins GitHub Actions to full hashes and versions
|
# Pins GitHub Actions to full hashes and versions
|
||||||
@@ -336,6 +340,8 @@ cask "jetbrains-toolbox"
|
|||||||
cask "keybase"
|
cask "keybase"
|
||||||
# Kubernetes IDE
|
# Kubernetes IDE
|
||||||
cask "lens"
|
cask "lens"
|
||||||
|
# Neovim Client
|
||||||
|
cask "neovide"
|
||||||
# Reverse proxy, secure introspectable tunnels to localhost
|
# Reverse proxy, secure introspectable tunnels to localhost
|
||||||
cask "ngrok"
|
cask "ngrok"
|
||||||
# Simple application that will prevent iTunes or Apple Music from launching
|
# Simple application that will prevent iTunes or Apple Music from launching
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ g.loaded_java_provider = 0 -- Disable java provider
|
|||||||
-- Most of the good defaults are provided by `mini.basics`
|
-- Most of the good defaults are provided by `mini.basics`
|
||||||
-- See: lua/plugins/mini.lua
|
-- See: lua/plugins/mini.lua
|
||||||
o.confirm = true -- Confirm before closing unsaved buffers
|
o.confirm = true -- Confirm before closing unsaved buffers
|
||||||
|
o.dictionary = '/usr/share/dict/words' -- Add system dictionary
|
||||||
o.ignorecase = true -- Ignore case in search patterns
|
o.ignorecase = true -- Ignore case in search patterns
|
||||||
o.inccommand = 'split' -- Preview substitutions live, as you type!
|
o.inccommand = 'split' -- Preview substitutions live, as you type!
|
||||||
o.list = true -- Show invisible characters
|
o.list = true -- Show invisible characters
|
||||||
@@ -37,7 +38,7 @@ o.scrolloff = 8 -- Show context around cursor
|
|||||||
o.sidescrolloff = 8 -- Show context around cursor
|
o.sidescrolloff = 8 -- Show context around cursor
|
||||||
o.signcolumn = 'yes' -- Keep signcolumn on by default
|
o.signcolumn = 'yes' -- Keep signcolumn on by default
|
||||||
o.spell = true -- Enable spell checking
|
o.spell = true -- Enable spell checking
|
||||||
o.spelllang = 'en_us' -- Set the spell checking language
|
o.spelllang = 'en_gb,en_us' -- Set the spell checking language
|
||||||
o.splitbelow = true -- split to the bottom
|
o.splitbelow = true -- split to the bottom
|
||||||
o.splitright = true -- vsplit to the right
|
o.splitright = true -- vsplit to the right
|
||||||
o.termguicolors = true -- Enable GUI colors
|
o.termguicolors = true -- Enable GUI colors
|
||||||
|
|||||||
@@ -5,8 +5,14 @@ return {
|
|||||||
'folke/snacks.nvim',
|
'folke/snacks.nvim',
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
---@type snacks.Config
|
||||||
opts = {
|
opts = {
|
||||||
bigfile = { enabled = true },
|
bigfile = { enabled = true },
|
||||||
|
input = { enabled = true },
|
||||||
|
notifier = {
|
||||||
|
enabled = true,
|
||||||
|
timeout = 3000,
|
||||||
|
},
|
||||||
gitbrowse = { enabled = true },
|
gitbrowse = { enabled = true },
|
||||||
quickfile = { enabled = true },
|
quickfile = { enabled = true },
|
||||||
statuscolumn = {
|
statuscolumn = {
|
||||||
@@ -38,6 +44,11 @@ return {
|
|||||||
{
|
{
|
||||||
'folke/noice.nvim',
|
'folke/noice.nvim',
|
||||||
event = 'VeryLazy',
|
event = 'VeryLazy',
|
||||||
|
dependencies = {
|
||||||
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
|
'MunifTanjim/nui.nvim',
|
||||||
|
'rcarriga/nvim-notify',
|
||||||
|
},
|
||||||
opts = {
|
opts = {
|
||||||
lsp = {
|
lsp = {
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
@@ -60,7 +71,10 @@ return {
|
|||||||
filter = {
|
filter = {
|
||||||
event = 'msg_show',
|
event = 'msg_show',
|
||||||
kind = '',
|
kind = '',
|
||||||
find = 'written',
|
any = {
|
||||||
|
{ find = 'written' },
|
||||||
|
{ find = '%d of %d --%d%--' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
opts = { skip = true },
|
opts = { skip = true },
|
||||||
},
|
},
|
||||||
@@ -101,14 +115,6 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
dependencies = {
|
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
|
||||||
'MunifTanjim/nui.nvim',
|
|
||||||
-- OPTIONAL:
|
|
||||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
|
||||||
-- If not available, we use `mini` as the fallback
|
|
||||||
'rcarriga/nvim-notify',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- A pretty diagnostics, references, telescope results,
|
-- A pretty diagnostics, references, telescope results,
|
||||||
@@ -131,7 +137,7 @@ return {
|
|||||||
},
|
},
|
||||||
modes = {
|
modes = {
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
auto_open = true,
|
auto_open = false,
|
||||||
},
|
},
|
||||||
test = {
|
test = {
|
||||||
mode = 'diagnostics',
|
mode = 'diagnostics',
|
||||||
@@ -139,7 +145,7 @@ return {
|
|||||||
type = 'split',
|
type = 'split',
|
||||||
relative = 'win',
|
relative = 'win',
|
||||||
position = 'right',
|
position = 'right',
|
||||||
size = 0.3,
|
size = 0.25,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
cascade = {
|
cascade = {
|
||||||
@@ -158,13 +164,4 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Navigate your code with search labels, enhanced
|
|
||||||
-- character motions and Treesitter integration
|
|
||||||
-- https://github.com/folke/flash.nvim
|
|
||||||
{
|
|
||||||
'folke/flash.nvim',
|
|
||||||
event = 'VeryLazy',
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,17 +108,25 @@ local lsp_servers = {
|
|||||||
-- These are automatically configured by WhoIsSethDaniel/mason-tool-installer.nvim
|
-- These are automatically configured by WhoIsSethDaniel/mason-tool-installer.nvim
|
||||||
local mason_tools = {
|
local mason_tools = {
|
||||||
'actionlint',
|
'actionlint',
|
||||||
|
'ast-grep',
|
||||||
|
'black',
|
||||||
'editorconfig-checker',
|
'editorconfig-checker',
|
||||||
'goimports',
|
'goimports',
|
||||||
|
'golangci-lint',
|
||||||
|
'golines',
|
||||||
|
'gopls',
|
||||||
'gotests',
|
'gotests',
|
||||||
|
'isort',
|
||||||
'phpcbf',
|
'phpcbf',
|
||||||
'phpmd',
|
'phpmd',
|
||||||
'phpstan',
|
'phpstan',
|
||||||
'pint',
|
'pint',
|
||||||
'prettierd',
|
'prettierd',
|
||||||
|
'revive',
|
||||||
'semgrep',
|
'semgrep',
|
||||||
'shellcheck',
|
'shellcheck',
|
||||||
'shfmt',
|
'shfmt',
|
||||||
|
'sonarlint-language-server',
|
||||||
'staticcheck',
|
'staticcheck',
|
||||||
'stylua',
|
'stylua',
|
||||||
'trivy',
|
'trivy',
|
||||||
@@ -323,7 +331,7 @@ return {
|
|||||||
|
|
||||||
-- Disable autoformat for files in a certain paths
|
-- Disable autoformat for files in a certain paths
|
||||||
local bufname = vim.api.nvim_buf_get_name(bufnr)
|
local bufname = vim.api.nvim_buf_get_name(bufnr)
|
||||||
if bufname:match '/node_modules|vendor/' then return end
|
if bufname:match '/dist|node_modules|vendor/' then return end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
|
|||||||
@@ -25,6 +25,14 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- Better Around/Inside textobjects
|
||||||
|
--
|
||||||
|
-- Examples:
|
||||||
|
-- - va) - [V]isually select [A]round [)]paren
|
||||||
|
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||||
|
-- - ci' - [C]hange [I]nside [']quote
|
||||||
|
require('mini.ai').setup { n_lines = 500 }
|
||||||
|
|
||||||
-- Animate common Neovim actions
|
-- Animate common Neovim actions
|
||||||
-- Replaced anuvyklack/windows.nvim
|
-- Replaced anuvyklack/windows.nvim
|
||||||
require('mini.animate').setup()
|
require('mini.animate').setup()
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ return {
|
|||||||
'document_symbols',
|
'document_symbols',
|
||||||
},
|
},
|
||||||
source_selector = {
|
source_selector = {
|
||||||
winbar = true,
|
winbar = false,
|
||||||
statusline = false,
|
statusline = false,
|
||||||
separator = { left = '', right = '' },
|
separator = { left = '', right = '' },
|
||||||
show_separator_on_edge = true,
|
show_separator_on_edge = true,
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
return {
|
return {
|
||||||
-- https://github.com/preservim/vim-colors-pencil
|
-- https://github.com/rmehri01/onenord.nvim
|
||||||
{
|
{
|
||||||
'preservim/vim-colors-pencil',
|
'rmehri01/onenord.nvim',
|
||||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||||
config = function()
|
opts = {
|
||||||
vim.cmd 'colorscheme pencil'
|
borders = true,
|
||||||
vim.api.nvim_set_option_value('pencil_terminal_italics', 1, {})
|
fade_nc = true,
|
||||||
end,
|
disable = {
|
||||||
|
float_background = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Automatic dark mode
|
-- Automatic dark mode
|
||||||
|
|||||||
1
config/tmux/plugins/tmux-resurrect
Submodule
1
config/tmux/plugins/tmux-resurrect
Submodule
Submodule config/tmux/plugins/tmux-resurrect added at cff343cf9e
@@ -137,6 +137,9 @@ set -g @mode_indicator_sync_mode_style 'bg=default,fg=red'
|
|||||||
set -g @fzf-url-bind 'u'
|
set -g @fzf-url-bind 'u'
|
||||||
set -g @fzf-url-history-limit '2000'
|
set -g @fzf-url-history-limit '2000'
|
||||||
|
|
||||||
|
# https://github.com/tmux-plugins/tmux-continuum
|
||||||
|
set -g @continuum-restore 'on'
|
||||||
|
|
||||||
# ── Own scripts ───────────────────────────────────────────────────────
|
# ── Own scripts ───────────────────────────────────────────────────────
|
||||||
|
|
||||||
# If we started tmux with a session name, rename it.
|
# If we started tmux with a session name, rename it.
|
||||||
@@ -154,6 +157,7 @@ run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-window-name/tmux_window_name
|
|||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux"
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux"
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
|
||||||
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux"
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux"
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux"
|
||||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.tmux"
|
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.tmux"
|
||||||
|
|||||||
@@ -372,8 +372,10 @@ function! plug#end()
|
|||||||
|
|
||||||
for [cmd, names] in items(lod.cmd)
|
for [cmd, names] in items(lod.cmd)
|
||||||
execute printf(
|
execute printf(
|
||||||
\ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)',
|
\ has('patch-7.4.1898')
|
||||||
\ cmd, string(cmd), string(names))
|
\ ? 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, <q-mods> ,%s)'
|
||||||
|
\ : 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)'
|
||||||
|
\ , cmd, string(cmd), string(names))
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
for [map, names] in items(lod.map)
|
for [map, names] in items(lod.map)
|
||||||
@@ -651,11 +653,19 @@ function! s:lod_ft(pat, names)
|
|||||||
call s:doautocmd('filetypeindent', 'FileType')
|
call s:doautocmd('filetypeindent', 'FileType')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:lod_cmd(cmd, bang, l1, l2, args, names)
|
if has('patch-7.4.1898')
|
||||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
function! s:lod_cmd(cmd, bang, l1, l2, args, mods, names)
|
||||||
call s:dobufread(a:names)
|
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||||
execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
call s:dobufread(a:names)
|
||||||
endfunction
|
execute printf('%s %s%s%s %s', a:mods, (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
||||||
|
endfunction
|
||||||
|
else
|
||||||
|
function! s:lod_cmd(cmd, bang, l1, l2, args, names)
|
||||||
|
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||||
|
call s:dobufread(a:names)
|
||||||
|
execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
||||||
|
endfunction
|
||||||
|
endif
|
||||||
|
|
||||||
function! s:lod_map(map, names, with_prefix, prefix)
|
function! s:lod_map(map, names, with_prefix, prefix)
|
||||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||||
@@ -1075,12 +1085,16 @@ function! s:hash_match(a, b)
|
|||||||
return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0
|
return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:disable_credential_helper()
|
||||||
|
return s:git_version_requirement(2) && get(g:, 'plug_disable_credential_helper', 1)
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:checkout(spec)
|
function! s:checkout(spec)
|
||||||
let sha = a:spec.commit
|
let sha = a:spec.commit
|
||||||
let output = s:git_revision(a:spec.dir)
|
let output = s:git_revision(a:spec.dir)
|
||||||
let error = 0
|
let error = 0
|
||||||
if !empty(output) && !s:hash_match(sha, s:lines(output)[0])
|
if !empty(output) && !s:hash_match(sha, s:lines(output)[0])
|
||||||
let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : ''
|
let credential_helper = s:disable_credential_helper() ? '-c credential.helper= ' : ''
|
||||||
let output = s:system(
|
let output = s:system(
|
||||||
\ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir)
|
\ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir)
|
||||||
let error = v:shell_error
|
let error = v:shell_error
|
||||||
@@ -1589,7 +1603,7 @@ while 1 " Without TCO, Vim stack is bound to explode
|
|||||||
let [error, _] = s:git_validate(spec, 0)
|
let [error, _] = s:git_validate(spec, 0)
|
||||||
if empty(error)
|
if empty(error)
|
||||||
if pull
|
if pull
|
||||||
let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch']
|
let cmd = s:disable_credential_helper() ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch']
|
||||||
if has_tag && !empty(globpath(spec.dir, '.git/shallow'))
|
if has_tag && !empty(globpath(spec.dir, '.git/shallow'))
|
||||||
call extend(cmd, ['--depth', '99999999'])
|
call extend(cmd, ['--depth', '99999999'])
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,9 +1,18 @@
|
|||||||
local wezterm = require 'wezterm'
|
local wezterm = require 'wezterm'
|
||||||
local config = wezterm.config_builder()
|
local config = wezterm.config_builder()
|
||||||
|
|
||||||
|
config.set_environment_variables = {
|
||||||
|
COLORTERM = 'truecolor',
|
||||||
|
}
|
||||||
|
|
||||||
-- Font and font size
|
-- Font and font size
|
||||||
config.font_size = 14.0
|
config.font_size = 14.0
|
||||||
config.font = wezterm.font_with_fallback {
|
config.font = wezterm.font_with_fallback {
|
||||||
|
{
|
||||||
|
family = 'Operator Mono',
|
||||||
|
weight = 'Book',
|
||||||
|
},
|
||||||
|
'Operator Mono',
|
||||||
'JetBrainsMonoNL NFM Light',
|
'JetBrainsMonoNL NFM Light',
|
||||||
'JetBrains Mono',
|
'JetBrains Mono',
|
||||||
'Symbols Nerd Font Mono',
|
'Symbols Nerd Font Mono',
|
||||||
|
|||||||
@@ -27,7 +27,8 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/ivuorinen/dotfiles#readme",
|
"homepage": "https://github.com/ivuorinen/dotfiles#readme",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ivuorinen/base-configs": "^2.0.0"
|
"@ivuorinen/base-configs": "^2.0.0",
|
||||||
|
"bundle-audit": "^0.1.0"
|
||||||
},
|
},
|
||||||
"packageManager": "yarn@1.22.22"
|
"packageManager": "yarn@1.22.22"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user