From e06db158e629fc76407be368790476a445eff3fb Mon Sep 17 00:00:00 2001 From: Adam Green Date: Sun, 21 Jun 2026 01:12:03 +1200 Subject: [PATCH 1/4] feat --- config/nvim/lua/config/keymap.lua | 16 ++++------------ config/nvim/lua/config/option.lua | 8 ++++++++ config/nvim/lua/plugins/formatting.lua | 4 ++-- config/nvim/lua/plugins/markdown.lua | 2 +- config/pi/AGENTS.md | 7 +++++++ config/pi/settings.json | 6 +++--- dotfiles/common/.zshrc | 4 ++-- 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/config/nvim/lua/config/keymap.lua b/config/nvim/lua/config/keymap.lua index 01212a7..1edef45 100644 --- a/config/nvim/lua/config/keymap.lua +++ b/config/nvim/lua/config/keymap.lua @@ -103,7 +103,10 @@ km("n", "rg", ":lua require'telescope.builtin'.live_grep(require('telesc km("n", "rc", ":lua require'telescope.builtin'.grep_string(require('telescope.themes').get_ivy({}))", opts) -- Search for current word vim.keymap.set("n", "g", function() - require("telescope.builtin").grep_string(require("telescope.themes").get_ivy({ hidden = true })) + require("telescope.builtin").current_buffer_fuzzy_find(require("telescope.themes").get_ivy({ + hidden = true, + default_text = vim.fn.expand(""), + })) end, opts) vim.keymap.set("n", ".", function() require("telescope.builtin").grep_string(require("telescope.themes").get_ivy({ hidden = true })) @@ -120,16 +123,5 @@ vim.keymap.set("n", "z", ":ZenMode") -- Misc / Unused / Broken --- Move blocks of text up and down -km("x", "J", ":move '>+1gv-gv", opts) -km("x", "K", ":move '<-2gv-gv", opts) - -- change nvim behaviour of replacing buffer after ciw km("v", "p", '"_dP', opts) - --- from https://youtu.be/w7i4amO_zaE --- move selected blocks up and down with J and K -km("v", "J", ":m '>+1gv=gv", opts) -km("v", "K", ":m '>-2gv=gv", opts) --- keep cursor in place when using J -km("n", "J", "mzJ`z", opts) diff --git a/config/nvim/lua/config/option.lua b/config/nvim/lua/config/option.lua index 21840fc..da14db1 100644 --- a/config/nvim/lua/config/option.lua +++ b/config/nvim/lua/config/option.lua @@ -150,3 +150,11 @@ vim.opt.wildignore:append("*.egg-info/**") -- Enable wildmenu for command-line completion vim.opt.wildmenu = true vim.opt.wildmode = "longest:full,full" + +--- Folding Config +vim.opt.foldmethod = "expr" +vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" +-- High foldlevel keeps everything open on load; without this, folds start closed +vim.opt.foldlevel = 99 +vim.opt.foldlevelstart = 99 +vim.opt.foldtext = "" diff --git a/config/nvim/lua/plugins/formatting.lua b/config/nvim/lua/plugins/formatting.lua index bcdddc4..404ecc1 100644 --- a/config/nvim/lua/plugins/formatting.lua +++ b/config/nvim/lua/plugins/formatting.lua @@ -24,7 +24,6 @@ return { python = { "isort", "ruff_format", - "trim_whitespace", }, -- markdown = { "injected" }, javascript = { "prettier" }, @@ -32,7 +31,8 @@ return { yaml = { "yamlfix" }, sql = { "sqlfluff" }, ["*"] = { - "codespell", + -- "codespell", + "trim_whitespace", "trim_newlines", }, }, diff --git a/config/nvim/lua/plugins/markdown.lua b/config/nvim/lua/plugins/markdown.lua index f5badeb..61bfcb3 100644 --- a/config/nvim/lua/plugins/markdown.lua +++ b/config/nvim/lua/plugins/markdown.lua @@ -2,7 +2,7 @@ return { "preservim/vim-markdown", ft = "markdown", init = function() - vim.g.vim_markdown_folding = 1 + vim.g.vim_markdown_folding_disabled = 1 vim.g.vim_markdown_folding_level = 6 vim.g.vim_markdown_frontmatter = 1 vim.g.vim_markdown_no_default_key_mappings = 1 diff --git a/config/pi/AGENTS.md b/config/pi/AGENTS.md index 42dab91..56f8482 100644 --- a/config/pi/AGENTS.md +++ b/config/pi/AGENTS.md @@ -41,3 +41,10 @@ Only include comments when they explain something that is not obvious from the c Always respect existing conventions in each file and across the code base when making changes. Always ask for permissions before starting work. Never edit files until you have presented a plat to the user. + +## About Me + +I like: + +- Simple solutions +- Small edits that I can change diff --git a/config/pi/settings.json b/config/pi/settings.json index fc19f53..bbedc48 100644 --- a/config/pi/settings.json +++ b/config/pi/settings.json @@ -1,7 +1,7 @@ { - "lastChangelogVersion": "0.78.0", + "lastChangelogVersion": "0.79.1", "defaultProvider": "openrouter", - "defaultModel": "moonshotai/kimi-k2.5", + "defaultModel": "~google/gemini-pro-latest", "theme": "dracula", "packages": [ "npm:@aliou/pi-guardrails", @@ -11,6 +11,6 @@ "npm:pi-mono-status-line", "npm:@guwidoe/pi-prompt-suggester" ], - "defaultThinkingLevel": "off", + "defaultThinkingLevel": "high", "quietStartup": true } \ No newline at end of file diff --git a/dotfiles/common/.zshrc b/dotfiles/common/.zshrc index 501f717..16a1f75 100644 --- a/dotfiles/common/.zshrc +++ b/dotfiles/common/.zshrc @@ -113,7 +113,6 @@ setopt HIST_REDUCE_BLANKS # Remove superfluous blanks from commands export AWS_LOG_LEVEL=3 alias brew='arch -arm64 brew' -source ~/dotfiles/macos/pyenv-flags # custom ipython config export IPYTHONDIR="$HOME/dotfiles/.ipython" @@ -123,7 +122,8 @@ export IPYTHONDIR="$HOME/dotfiles/.ipython" # export NODE_PATH=~/.npm-packages/lib/node_modules # export PATH="/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:$PATH" -pyenv_init +# source ~/dotfiles/macos/pyenv-flags +# pyenv_init starship_init flyctl_init From 31cc99283e74e1541cb92211953ea1f56d9f2aec Mon Sep 17 00:00:00 2001 From: Adam Green Date: Sat, 4 Jul 2026 20:05:57 +1200 Subject: [PATCH 2/4] feat --- config/nvim/after/ftplugin/markdown.lua | 3 +++ config/pi/settings.json | 2 +- dotfiles/.tmux.conf | 3 +++ scripts/search.sh | 8 ++++++-- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/config/nvim/after/ftplugin/markdown.lua b/config/nvim/after/ftplugin/markdown.lua index 19d18a2..7dc7689 100644 --- a/config/nvim/after/ftplugin/markdown.lua +++ b/config/nvim/after/ftplugin/markdown.lua @@ -1,2 +1,5 @@ vim.opt_local.foldenable = true vim.opt_local.foldlevel = 6 + +-- Shift+Enter: new bullet, indented one level deeper (requires kitty keyboard protocol) +vim.keymap.set("i", "", "(bullets-newline)(bullets-demote)", { buffer = true, remap = true }) diff --git a/config/pi/settings.json b/config/pi/settings.json index 6d1dc29..6212984 100644 --- a/config/pi/settings.json +++ b/config/pi/settings.json @@ -10,5 +10,5 @@ "npm:pi-mono-status-line", "npm:@guwidoe/pi-prompt-suggester" ], - "defaultThinkingLevel": "medium", + "defaultThinkingLevel": "medium" } diff --git a/dotfiles/.tmux.conf b/dotfiles/.tmux.conf index bfea4f8..f991952 100644 --- a/dotfiles/.tmux.conf +++ b/dotfiles/.tmux.conf @@ -73,3 +73,6 @@ run '~/.tmux/plugins/tpm/tpm' # pi needs this... set -g extended-keys on set -g extended-keys-format csi-u +# make tmux request the kitty keyboard protocol from the outer terminal +# (required for nvim to distinguish from ) +set -as terminal-features 'xterm*:extkeys' diff --git a/scripts/search.sh b/scripts/search.sh index e4997e7..a80dac1 100755 --- a/scripts/search.sh +++ b/scripts/search.sh @@ -7,8 +7,12 @@ MIN_HEIGHT=20 target_dir="${1:-.}" cd "$target_dir" || exit +# exclude ./archive from the file list fed to fzf +FZF_DEFAULT_COMMAND='find . -path ./archive -prune -o -type f -print' +export FZF_DEFAULT_COMMAND + if [ "$TERM_HEIGHT" -ge "$MIN_HEIGHT" ]; then - fzf --preview 'bat --style=numbers --color=always {}' --height 60% -m --print0 | xargs -0 $EDITOR + fzf --preview 'bat --style=numbers --color=always {}' --height 60% -m --print0 | xargs -0 "$EDITOR" else - fzf --no-preview --height 40% -m --print0 | xargs -0 $EDITOR + fzf --no-preview --height 40% -m --print0 | xargs -0 "$EDITOR" fi From ca77a69aeb5a0b54cf1ab738d8d20ac0558981f0 Mon Sep 17 00:00:00 2001 From: Adam Green Date: Sat, 4 Jul 2026 20:06:27 +1200 Subject: [PATCH 3/4] feat --- scripts/drafts.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 scripts/drafts.sh diff --git a/scripts/drafts.sh b/scripts/drafts.sh new file mode 100755 index 0000000..9452a32 --- /dev/null +++ b/scripts/drafts.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env sh +echo "== ~/personal/area/writing ==" +ls -t ~/personal/area/writing + +echo "== final-personal-blog/_drafts ==" +ls -t ~/personal/area/blogs/final-personal-blog/_drafts + +echo "== adgefficiency.com (draft: true) ==" +grep -rl 'draft: true' ~/personal/area/blogs/adgefficiency.com/content From 0844dc106297cdc3232cc09b994458d0d5c4c75d Mon Sep 17 00:00:00 2001 From: Adam Green Date: Sun, 5 Jul 2026 03:09:29 +1200 Subject: [PATCH 4/4] docs --- README.md | 58 --------------------------------------------- config/pi/AGENTS.md | 12 +++++----- 2 files changed, 6 insertions(+), 64 deletions(-) diff --git a/README.md b/README.md index c7f7670..2ca2e0b 100644 --- a/README.md +++ b/README.md @@ -111,33 +111,6 @@ The `s` command opens a fuzzy file finder (fzf) to search and open files in `$ED Lot's of aliases - see `./scripts/aliases.sh`. Some small interactive shell helper functions in `./scripts/funcs.sh`. -## AI Agent Configuration - -`PI_CODING_AGENT_DIR` in dotfiles/common/env.sh points pi's config to `~/dotfiles/config/pi/`. - -`CLAUDE.md` at the repo root serves the same purpose for Claude Code. - -<<<<<<< HEAD - - - - - Label - setenv.XDG_CONFIG_HOME - ProgramArguments - - sh - -c - launchctl setenv XDG_CONFIG_HOME $HOME/dotfiles - - RunAtLoad - - - - -$ launchctl load ~/Library/LaunchAgents/setenv.XDG_CONFIG_HOME.plist -``` - ## AI Configuration Two AGENTS.md: @@ -150,34 +123,3 @@ PI_CODING_AGENT_DIR in dotfiles/common/env.sh points pi's config to ~/dotfiles/c CLAUDE.md at the repo root serves the same purpose for Claude Code, but is symlinked to `AGENTS.md`. Skills are defined once in agents/skills/ and symlinked by make dotfiles to both ~/.agents/skills (pi) and ~/.claude/skills (Claude Code). -||||||| 5f1ddca - - - - - Label - setenv.XDG_CONFIG_HOME - ProgramArguments - - sh - -c - launchctl setenv XDG_CONFIG_HOME $HOME/dotfiles - - RunAtLoad - - - - -$ launchctl load ~/Library/LaunchAgents/setenv.XDG_CONFIG_HOME.plist -``` - -## Agent Configuration - -PI_CODING_AGENT_DIR in dotfiles/common/env.sh points pi's config to ~/dotfiles/config/pi/, which contains agent/AGENTS.md (agent instructions), settings.json, themes, and sessions. - -CLAUDE.md at the repo root serves the same purpose for Claude Code. - -Skills are defined once in agents/skills/ and symlinked by make dotfiles to both ~/.agents/skills (pi) and ~/.claude/skills (Claude Code). -======= -Skills are defined once in `.agents/skills/` and symlinked by `make dotfiles` to both `~/.agents/skills` (for Pi) and `~/.claude/skills` (for Claude Code). ->>>>>>> dacbf2ff02af0435dad113fec6089182f393df64 diff --git a/config/pi/AGENTS.md b/config/pi/AGENTS.md index 178d978..031ef4c 100644 --- a/config/pi/AGENTS.md +++ b/config/pi/AGENTS.md @@ -8,7 +8,7 @@ You are an expert software engineer and data scientist, writing excellent code: - Include docstrings for functions - All Python code should pass strict type checking. Use `list` style rather than `typing.List` where you can (same for all other objects like `dict` or `tuple`) - Push back on solutions if you think another one should be compared in terms of tradeoffs -- Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives. +- Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives. - List tradeoffs explicitly if appropriate. List assumptions explicitly if appropriate. List what you are uncertain about. - Always be consistent with patterns established in the code base - Don't put `_df` suffixes onto dataframe variables - use `data` as the default name for a dataframe @@ -21,11 +21,11 @@ Always create a plan and then ask to execute. You should very rarely go off and ## Searching & Reading -When reading, read deeply, in great detail. Note intricacies. Go through everything. +When reading, read deeply, in great detail. Note intricacies. Go through everything. ## Planning -Plans will go into `./ai/plan-something.md`. +Plans will go into `./ai/plan-something.md`. Always start a plan filename with `plan-` Check for a plan before you start a planning task - if you find an existing plan, the read and edit it. @@ -45,19 +45,19 @@ Plans should include a section on `## Steps` which lists in order the work neede ## How to Respond -Responses should be concise. +Responses should be concise. List tradeoffs explicitly if appropriate. List assumptions explicitly if appropriate. List what you are uncertain about. Do not include summaries at the end of responses unless specifically asked. -Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives. +Try to push back if you can and offer different ideas or approaches. Try to explore a range of ideas, perspectives. Always create a plan and then ask to execute. You should rarely go off and implement without some back and forth conversation with me. ## Searching & Reading -Read deeply in great detail. Note intricacies. Go through everything. +Read deeply in great detail. Note intricacies. Go through everything. Search the internet if you need it - I always want you to check documentation.