diff --git a/nvim/m-housh/lazy-lock.json b/nvim/m-housh/lazy-lock.json index 084c10d..6ef15a5 100644 --- a/nvim/m-housh/lazy-lock.json +++ b/nvim/m-housh/lazy-lock.json @@ -14,7 +14,7 @@ "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, "go.nvim": { "branch": "master", "commit": "54387e506e597ab65a89baa1681429728f66ed71" }, "guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" }, - "lazy.nvim": { "branch": "main", "commit": "62745a7320f48a00ac4f7b0591352608cbc6bcea" }, + "lazy.nvim": { "branch": "main", "commit": "41d3b2a9dbf03774a2c92c376d8371dcca9710a9" }, "lazygit.nvim": { "branch": "main", "commit": "de35012036d43bca03628d40d083f7c02a4cda3f" }, "lsp_signature.nvim": { "branch": "master", "commit": "bdf3dc7bb03edd25c2173e0e31c2fb122052ed23" }, "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, diff --git a/zsh/.zshenv b/zsh/.zshenv new file mode 100644 index 0000000..695afbb --- /dev/null +++ b/zsh/.zshenv @@ -0,0 +1,4 @@ +# This needs placed in the ~/.zshenv + +export ZDOTDIR="$HOME/.config/zsh" +[ -f "$ZDOTDIR/.zshenv" ] && source "$ZDOTDIR/.zshenv" diff --git a/zsh/config/.zshenv b/zsh/config/.zshenv index 9400345..dc4a708 100644 --- a/zsh/config/.zshenv +++ b/zsh/config/.zshenv @@ -1,3 +1,5 @@ +# This should be placed in "$XDG_CONFIG_HOME/zsh/.zshenv" + # Config export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local" diff --git a/zsh/config/.zshrc b/zsh/config/.zshrc index 33c0a5b..a262699 100644 --- a/zsh/config/.zshrc +++ b/zsh/config/.zshrc @@ -65,6 +65,15 @@ path_prepend \ "$HOME/.local/bin" \ "$SCRIPTS" +fpath_prepend \ + "$(brew --prefix)/share/zsh/site-functions" \ + "$(brew --prefix)/share/zsh-completions" \ + "$ZDOTDIR/completions" \ + "$HOME/.local/completions" \ + "$ZDOTDIR/functions" + +autoload -Uz $fpath[1]/*(.:t) + #------------------------------ history ------------------------------ setopt appendhistory # append to history setopt sharehistory # share history across multiple sessions @@ -137,8 +146,6 @@ alias ga='git add' alias gcb='git checkout -b' alias gco='git checkout' alias gcm='git commit -a -m' -#alias gl() { git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit } -#alias gma() { git add . && git commit -m "$1" } alias gp='git push' alias gs='git status' alias l='ls -lah --color=auto' @@ -158,14 +165,3 @@ alias nvim-lazy='NVIM_APPNAME=lazy nvim' #------------------------------ local configs ------------------------------ _source_if "$ZDOTDIR/.zshrc-local" -#------------------------------ functions ------------------------------ -fpath_prepend \ - "$(brew --prefix)/share/zsh/site-functions" \ - "$(brew --prefix)/share/zsh-completions" \ - "$ZDOTDIR/completions" \ - "$HOME/.local/completions" \ - "$ZDOTDIR/functions" - -autoload -Uz $fpath[1]/*(.:t) - - diff --git a/zsh/config/functions/gl b/zsh/config/functions/gl new file mode 100755 index 0000000..8cb7f6a --- /dev/null +++ b/zsh/config/functions/gl @@ -0,0 +1,8 @@ +#!/bin/zsh + +# Prettier git log +function gl() { + git log --graph \ + --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' \ + --abbrev-commit +} diff --git a/zsh/config/functions/gma b/zsh/config/functions/gma new file mode 100755 index 0000000..b39d013 --- /dev/null +++ b/zsh/config/functions/gma @@ -0,0 +1,11 @@ +#!/bin/zsh + +# Add all and commit to git. + +function gma() { + [ -z "$1" ] \ + && echo "usage: gma " \ + && return 1 + + git add . && git commit -m "$1" +}