This commit is contained in:
jay 2022-10-23 21:32:02 +08:00
parent 99172a5da5
commit 44ee4cca95
7 changed files with 36 additions and 9 deletions

View File

@ -1,9 +1,10 @@
includes = []
packages = ["shell", "zsh", "vim", "nvim", "zsh_zinit"]
packages = ["shell", "zsh", "nvim", "zsh_zinit"]
[variables]
js_linter = "\"eslint\""
js_fixer = "\"prettier\""
email = "jay@lawsnote.com"
git_username = "jay"
enableTmux = false

View File

@ -152,7 +152,7 @@ font:
#style: Bold Italic
# Point size
size: 8.0
size: 10.0
# Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter

3
install_zinit.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin

View File

@ -15,3 +15,7 @@ Host dev
Host vpn
User root
HostName 192.168.201.254
Host lndev
User jay
HostName 192.168.88.12

View File

@ -7,10 +7,5 @@ fi
if type go > /dev/null; then
go install github.com/sourcegraph/go-langserver@latest
go install github.com/jstemmer/gotags@latest
go get -u github.com/cweill/gotests/...
fi
go install github.com/cweill/gotests/gotests@latest
if type rustup > /dev/null; then
rustup update
rustup component add rls rust-analysis rust-src
fi

View File

@ -31,6 +31,23 @@ function envf {
export $(cat $1 | grep -v '^#' | xargs)
}
function save-image {
if [ -z "$1" ]; then
echo "usage: save-image <image-name>"
exit 1
fi
imageName=$(echo ${1##*/} | sed 's/:/_/' | xargs -I {} echo "{}.tar")
lima nerdctl pull $1
lima nerdctl image save -o $imageName $1
lima nerdctl image rm $1
}
function ttySize {
echo "-e COLUMNS=$(tput cols) -e LINES=$(tput lines)"
}
export HISTORY_SUBSTRING_SEARCH_PREFIXED=1
export GOPATH="$HOME/go"
export GOROOT="$HOME/apps/go"
@ -55,3 +72,6 @@ if [ -f '/Users/jay/apps/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/jay/ap
# The next line enables shell command completion for gcloud.
# if [ -f '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/jay/apps/google-cloud-sdk/completion.zsh.inc'; fi
alias docker="lima nerdctl"
export DOCKER_HOST="unix:///Users/jay/.lima/docker/sock/docker.sock"

View File

@ -1,7 +1,8 @@
{{#if enableTmux}}
export ZSH_TMUX_AUTOSTART=true
export ZSH_TMUX_AUTOSTART_ONCE=true
export ZSH_TMUX_AUTOCONNECT=true
{{/if}}
# install zinit
# git clone https://github.com/zdharma-continuum/zinit.git ~/.zinit/bin
source ~/.zinit/bin/zinit.zsh
@ -30,8 +31,10 @@ zinit snippet OMZ::plugins/git/git.plugin.zsh
# Load OMZ extract folder
zinit ice svn
zinit snippet OMZ::plugins/extract
{{#if enableTmux}}
zinit ice svn
zinit snippet OMZ::plugins/tmux
{{/if}}
# theme
zinit light "tinyRatP/ys"
@ -45,3 +48,4 @@ zinit light "tinyRatP/ys"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export PATH="/usr/local/opt/openjdk/bin:$PATH"