Skip to content

Instantly share code, notes, and snippets.

@Talor-A
Talor-A / README.md
Created September 8, 2026 19:52
jj + neovim: config.toml, pr-comments.sh, jj.nvim lazy spec with PR comments in quickfix/diagnostics

jj + neovim setup

  • config.toml — ~/.config/jj/config.toml. Revset aliases (sl, closest_bookmark, closest_pushable), the ◇ log node for commits already in a branch, and aliases: tug, try-new, llm, prepush, pr (via jj-pr), pr-comments.
  • pr-comments.sh — ~/.config/jj/pr-comments.sh. Prints a PR's review threads (jj pr-comments [pr] [gh pr view flags]); --json for editors. Needs gh.
  • jj.lua — lazy.nvim spec for NicolasGB/jj.nvim on LazyVim. Keeps J/K nav in sub-modes, o runs jj-pr on the revision under the cursor, <S-a> absorbs, and <leader>jc / :JJPrComments loads PR review threads into Trouble's quickfix view and as diagnostics (virtual text at each line, full thread in <leader>cd).
# worktree-jump: fzf between repos and worktrees under ~/code
#
# ctrl+w on an empty prompt opens the picker; with text in the buffer it
# keeps its default behavior (backward-kill-word). `wt` runs the picker
# as a plain command.
# The main repo dir that owns a checkout: a worktree
# <parent>/worktrees/<repo>/<name> belongs to <parent>/<repo>; a repo
# belongs to itself.
_worktree_owner() {
@Talor-A
Talor-A / SKILL.md
Last active July 13, 2026 22:28
avoid-constructions skill
name avoid-constructions
description Lists writing constructions to avoid — catchphrases, slogan-like rules, rhetorical framing, and filler phrasing. Use when drafting PR descriptions, commit messages, docs, comments, or any user-facing text where plain language is preferred.

Avoid these constructions

Use plain, direct language. Do not add phrases for style, emphasis, or tone when they do not add information.

Catchphrases and trailing emphasis

@Talor-A
Talor-A / on-prompt.sh
Created June 9, 2026 22:52
claude hook for jj
#!/bin/sh
# Bail if not in a jj repo
jj root >/dev/null 2>&1 || exit 0
# Open a fresh empty change if the current one already has file changes.
# `jj try-new` is a custom alias (see dot-config/jj/config.toml) that prints
# "Current change is empty, not creating a new one" on stdout when it's a
# no-op — so we redirect stdout too, not just stderr.
jj try-new >/dev/null 2>&1
@Talor-A
Talor-A / settings.json
Last active June 9, 2026 22:51
claude hook settings for jj
{
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "~/.dotfiles/dot-claude/hooks/on-prompt.sh"
}
]
@Talor-A
Talor-A / talor.zsh-theme
Created June 9, 2026 22:39
talor.zsh-theme — oh-my-zsh custom theme with async prompts, jj/git integration, and vi-mode
#!/bin/zsh
setopt prompt_subst
export VIRTUAL_ENV_DISABLE_PROMPT=1
autoload -Uz colors
colors
# variables
git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo >> /Users/ta/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/ta/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
@Talor-A
Talor-A / git-llm.zsh
Created February 4, 2025 22:20
git-llm: automatically create commit messages. powered by `llm` by simon willison
#!/bin/zsh
# -----------------------------------------------------------------------------
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/
generate_commit_message() {
# Get last 3 commit messages
last_commits=$(git log -3 --pretty=format:"- %s" 2>/dev/null)
git diff --cached | llm "
Below is a diff of all staged changes, coming from the command:
on open dropped_items
repeat with imageFile in dropped_items
set imagePath to POSIX path of imageFile
try
set cmd to "PATH=$PATH:~/.local/bin && llm prompt \"You are a helpful image transcriber bot and it is your job to explain exactly what is in images so that blind people and other LLMs can understand the image. first state in plain terms what the pictured image looks like. then exactly transcribe word-for-word all text inside. it is important to transcribe all content so that no detail is omitted. do not include any other text in your reply besides these two things. EXAMPLE: 'a chat app with the message hello world as the first reply'. Now give your description of this image:\" -a " & quoted form of imagePath
set altText to do shell script cmd
display dialog altText buttons {"Copy", "OK"} default button "Copy"
if button returned of result is "Copy" then
set the clipboard to altText
end if
#!/bin/bash
# creates a new worktree.
# Usage: git wt [revision] [command]
# If no revision is specified, it will use the current HEAD.
# you can use `.` as a shortcut for HEAD too.
# If no command is specified, it will open the worktree in your IDE:
# this is `cursor` for me, but you can change it to your favorite editor.
# Function to generate a unique worktree name