This commit is contained in:
2022-11-14 15:14:22 +00:00
6 changed files with 221 additions and 6 deletions

View File

@@ -7,3 +7,5 @@
sort = version:refname sort = version:refname
[init] [init]
defaultBranch = master defaultBranch = master
[pull]
rebase = false

View File

@@ -120,6 +120,7 @@ tnoremap <Esc> <C-\><C-n>
nnoremap <Leader>ee :NvimTreeFindFileToggle<cr> nnoremap <Leader>ee :NvimTreeFindFileToggle<cr>
nnoremap <Leader>h <cmd>lua require("harpoon.mark").add_file()<cr> nnoremap <Leader>h <cmd>lua require("harpoon.mark").add_file()<cr>
nnoremap <Leader>/ :Commentary<cr> nnoremap <Leader>/ :Commentary<cr>
vnoremap <Leader>/ :Commentary<cr>
vnoremap J :m '>+1<CR>gv=gv vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv vnoremap K :m '<-2<CR>gv=gv
@@ -205,6 +206,14 @@ require('lspconfig')['gopls'].setup{
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,
} }
require('lspconfig')['pyright'].setup{
on_attach = on_attach,
capabilities = capabilities,
}
require('lspconfig')['tsserver'].setup{
on_attach = on_attach,
capabilities = capabilities,
}
EOF EOF
lua <<EOF lua <<EOF
@@ -284,5 +293,4 @@ lua <<EOF
EOF EOF
lua << EOF lua << EOF
require'lspconfig'.pyright.setup{}
EOF EOF

View File

@@ -2,6 +2,8 @@ export EDITOR=nvim
# If you come from bash you might have to change your $PATH. # If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:/opt/local/bin:$PATH export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:/opt/local/bin:$PATH
ulimit -n 65536 200000
ulimit -f unlimited
# eksctl # eksctl
fpath=($fpath ~/.zsh/completion) fpath=($fpath ~/.zsh/completion)
@@ -34,13 +36,15 @@ alias nvdf='nvim $HOME/.dotfiles/README.md'
alias cls='clear' alias cls='clear'
export PATH="/opt/homebrew/opt/protobuf@3.6/bin:$PATH" export PATH="/opt/homebrew/opt/protobuf@3.6/bin:$PATH"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
for conf in "$HOME/.config/zsh/config.d/"*.zsh; do for conf in "$HOME/.config/zsh/config.d/"*.zsh; do
source "${conf}" source "${conf}"
done done
unset conf unset conf
[[ -s "/home/jacob/.gvm/scripts/gvm" ]] && source "/home/jacob/.gvm/scripts/gvm" export STARSHIP_CONFIG=~/.config/zsh/starship.toml
export NVM_DIR="$HOME/.nvm" eval "$(starship init zsh)"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

View File

@@ -78,5 +78,4 @@ export SSH_KEY_PATH="~/.ssh/rsa_id"
# users are encouraged to define aliases within the ZSH_CUSTOM folder. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`. # For a full list of active aliases, run `alias`.
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
eval "$(starship init zsh)"

38
zsh/config.d/starship.zsh Normal file
View File

@@ -0,0 +1,38 @@
# find out which distribution we are running on
LFILE="/etc/*-release"
MFILE="/System/Library/CoreServices/SystemVersion.plist"
if [[ -f $LFILE ]]; then
_distro=$(awk '/^ID=/' /etc/*-release | awk -F'=' '{ print tolower($2) }')
elif [[ -f $MFILE ]]; then
_distro="macos"
fi
# set an icon based on the distro
# make sure your font is compatible with https://github.com/lukas-w/font-logos
case $_distro in
*kali*) ICON="ﴣ";;
*arch*) ICON="";;
*debian*) ICON="";;
*raspbian*) ICON="";;
*ubuntu*) ICON="";;
*elementary*) ICON="";;
*fedora*) ICON="";;
*coreos*) ICON="";;
*gentoo*) ICON="";;
*mageia*) ICON="";;
*centos*) ICON="";;
*opensuse*|*tumbleweed*) ICON="";;
*sabayon*) ICON="";;
*slackware*) ICON="";;
*linuxmint*) ICON="";;
*alpine*) ICON="";;
*aosc*) ICON="";;
*nixos*) ICON="";;
*devuan*) ICON="";;
*manjaro*) ICON="";;
*rhel*) ICON="";;
*macos*) ICON="";;
*) ICON="";;
esac
export STARSHIP_DISTRO="$ICON"

164
zsh/starship.toml Normal file
View File

@@ -0,0 +1,164 @@
# ~/.config/starship.toml
# Inserts a blank line between shell prompts
add_newline = true
# Change command timeout from 500 to 1000 ms
command_timeout = 1000
# Change the default prompt format
format = """
[╭╴](238)$env_var \
$username\
$hostname\
$localip\
$directory\
$time\
$line_break\
[|](238)$shlvl\
$singularity\
$vcsh\
$git_branch\
$git_commit\
$git_state\
$git_metrics\
$git_status\
$kubernetes\
$hg_branch\
$docker_context\
$package\
$c\
$cmake\
$cobol\
$daml\
$dart\
$deno\
$dotnet\
$elixir\
$elm\
$erlang\
$golang\
$haskell\
$helm\
$java\
$julia\
$kotlin\
$lua\
$nim\
$nodejs\
$ocaml\
$perl\
$php\
$pulumi\
$purescript\
$python\
$raku\
$rlang\
$red\
$ruby\
$rust\
$scala\
$swift\
$terraform\
$vlang\
$vagrant\
$zig\
$buf\
$nix_shell\
$conda\
$meson\
$spack\
$memory_usage\
$aws\
$gcloud\
$openstack\
$azure\
$crystal\
$custom\
$sudo\
$cmd_duration\
$jobs\
$battery\
$status\
$container\
$shell\
$line_break\
[╰─](238)$character"""
# Change the default prompt characters
[character]
error_symbol = "[✘](bold red)"
success_symbol = ""
[time]
disabled = false
# Shows an icon that should be included by zshrc script based on the distribution or os
[env_var.STARSHIP_DISTRO]
format = '[$env_value](white)'
variable = "STARSHIP_DISTRO"
disabled = false
# Shows the username
[username]
style_user = "white"
style_root = "white"
format = "[$user]($style) "
disabled = false
show_always = true
[hostname]
ssh_only = true
format = "on [$hostname](bold yellow) "
disabled = false
[directory]
truncate_to_repo = true
home_symbol = " ~"
read_only_style = "197"
read_only = "  "
format = "at [$path]($style)[$read_only]($read_only_style) "
[git_branch]
symbol = " "
format = "[$symbol$branch]($style) "
style = "bold green"
[git_status]
format = '[\(( $all_status)($ahead_behind)\)]($style) '
style = "bold green"
conflicted = "🏳"
up_to_date = " "
untracked = " "
ahead = "⇡${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
behind = "⇣${count}"
stashed = " "
modified = " "
staged = '[++$count ](green)'
renamed = "襁 "
deleted = " "
[kubernetes]
format = '[///](238) [ﴱ $context](bold purple) '
disabled = false
[python]
format = '[///](238) [${symbol}${pyenv_prefix}(${version} )(\($virtualenv\) )]($style)'
symbol = " "
python_binary = "python3"
disabled = false
[nodejs]
format = "[///](238) [ $version](bold green) "
disabled = false
[golang]
format = "[///](238) [$symbol($version )]($style)"
symbol = "ﳑ "
[package]
disabled = true
[gcloud]
format = '[///](238) [$symbol$account(@$domain)(\($region\))]($style) '