Compare commits

...

10 commits

8 changed files with 51 additions and 28 deletions

3
.gitmodules vendored
View file

@ -31,3 +31,6 @@
[submodule "neovim/pack/vendor/start/gitsigns.nvim"]
path = neovim/pack/vendor/start/gitsigns.nvim
url = https://github.com/lewis6991/gitsigns.nvim
[submodule "neovim/pack/vendor/start/nvim-lspconfig"]
path = neovim/pack/vendor/start/nvim-lspconfig
url = https://github.com/neovim/nvim-lspconfig

View file

@ -5,6 +5,7 @@ My NeoVim configuration
require('nvim-web-devicons').setup()
require('oil').setup()
require('gitsigns').setup()
require('lspconfig').phpactor.setup({})
-- Editor options
vim.wo.number = true

@ -0,0 +1 @@
Subproject commit 3ad562700d0615818bf358268ac8914f6ce2b079

View file

@ -86,10 +86,6 @@ apply = ["defer"]
local = "~/.zsh/plugins"
apply = ["defer"]
[plugins.thefuck]
local = "~/.zsh/plugins"
apply = ["defer"]
# This works best if it is placed last.
[plugins.compinit]
local = "~/.zsh/plugins"
@ -98,10 +94,6 @@ apply = ["defer"]
# Plugins that are even more deferred
# -----------------------------------
[plugins.github-copilot]
local = "~/.zsh/plugins"
apply = ["defer-more"]
[plugins.ngrok]
local = "~/.zsh/plugins"
apply = ["defer-more"]

View file

@ -2,5 +2,5 @@
# Setup Fast Node Manager
if (( ${+commands[fnm]} )); then
eval "$(fnm env --use-on-cd)"
eval "$(fnm env --use-on-cd --shell zsh)"
fi

View file

@ -1,10 +0,0 @@
#!/usr/bin/env zsh
# Setup GitHub Copilot
# first check we even have the genereic `gh` command
if (( ${+commands[gh]} )); then
# Now check we have the copilot plugin installed with `gh`
if gh extension list | rg copilot -c > /dev/null; then
eval "$(gh copilot alias -- zsh)"
fi
fi

View file

@ -1,6 +0,0 @@
#!/usr/bin/env zsh
# Init the fuck
if (( ${+commands[thefuck]} )); then
eval "$(thefuck --alias)"
fi

View file

@ -119,11 +119,53 @@ export BAT_THEME=$batTheme
# Source the untracked `extra` file
test -e $HOME/.extra && source $HOME/.extra
# Oh My Posh
if (( ${+commands[oh-my-posh]} )); then
eval "$(oh-my-posh init zsh --config $HOME/.config/jmb.omp.toml)"
# Set the prompt
# We need zsh git integration
# Autoload zsh's `add-zsh-hook` and `vcs_info` functions
# (-U autoload w/o substition, -z use zsh style)
autoload -Uz add-zsh-hook vcs_info
# Set prompt substitution so we can use the vcs_info_message variable
setopt prompt_subst
# Run the `vcs_info` hook to grab git info before displaying the prompt
add-zsh-hook precmd vcs_info
# Style the vcs_info message
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git*' formats '⎇ %b%u%c'
# Format when the repo is in an action (merge, rebase, etc)
zstyle ':vcs_info:git*' actionformats '%F{14}⏱ %*%f'
zstyle ':vcs_info:git*' unstagedstr '*'
zstyle ':vcs_info:git*' stagedstr '+'
# This enables %u and %c (unstaged/staged changes) to work,
# but can be slow on large repos
zstyle ':vcs_info:*:*' check-for-changes true
# First show the Loading indicator in the right prompt if shell plugins are still loading
RPROMPT='%F{8}$(if [[ -n $SHELL_LOADING ]]; then echo "Loading... "; fi)'
# Then we can also show the git branch
RPROMPT+='${vcs_info_msg_0_}'
# First set a dot that changes colour on success/fail or previous command
PROMPT='%(?.%F{blue}⏺.%F{red}⏺)%f '
# Show a symbol for the OS
# First we set the os_symbol variable we will use in the prompt
if [[ "$OSTYPE" == "darwin"* ]]; then
os_symbol=""
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
os_symbol="󰣇"
else
os_symbol="" # Fallback symbol if OS is neither macOS nor Linux
fi
PROMPT+='${os_symbol} '
# Then show the working directory
PROMPT+='%2~ '
# Finally we can adjust the prompt to show if we are a user or sudo
PROMPT+='%(!.#.$) '
# Finally we can have zsh auto source this rc file on command
# attribution: https://www.reddit.com/r/commandline/comments/12g76v/
trap "source $HOME/.zshrc" USR1