diff --git a/custom.el b/custom.el index 1e02394..f7f4e7b 100644 --- a/custom.el +++ b/custom.el @@ -7,12 +7,12 @@ '(apheleia-log-only-errors nil) '(custom-enabled-themes '(deeper-blue)) '(package-selected-packages - '(apheleia cape dart-mode diminish dotenv-mode dumber-jump embark evil - evil-collection evil-surround exec-path-from-shell - fish-mode forge ghostel jai-mode magit marginalia mise - move-text multiple-cursors org-roam pgmacs - terraform-mode undo-tree yaml-mode yasnippet - yasnippet-snippets)) + '(apheleia cape dart-mode diminish dotenv-mode duckdb-query + dumber-jump embark evil evil-collection evil-surround + exec-path-from-shell fish-mode forge ghostel jai-mode + magit marginalia mise move-text multiple-cursors + org-roam pgmacs pi-coding-agent terraform-mode undo-tree + yaml-mode yasnippet yasnippet-snippets)) '(package-vc-selected-packages '((pgmacs :url "https://github.com/emarsden/pgmacs.git") (jai-mode :url "https://github.com/valignatev/jai-mode.git")))) diff --git a/init.el b/init.el index 705734d..8674621 100644 --- a/init.el +++ b/init.el @@ -50,7 +50,8 @@ duplicate-line-final-position -1 duplicate-region-final-position -1 competions-detailed t - auth-sources '("~/.authinfo")) + auth-sources '("~/.authinfo") + tab-bar-show 1) (require 'project) (setq project-switch-commands '((project-find-file "Find file" "f") @@ -61,9 +62,10 @@ (define-key project-prefix-map "u" #'hgh/update-projects) -(when (file-directory-p (hgh/emacs-directory "work")) - (load-file (hgh/emacs-directory "work/work.el")) - (add-to-list 'load-path (hgh/emacs-directory "work"))) +(let ((work-dir (expand-file-name "work" user-emacs-directory))) + (when (file-directory-p work-dir) + (add-to-list 'load-path work-dir) + (load-file (expand-file-name "work.el" work-dir)))) (load-file (hgh/emacs-directory "utils.el")) @@ -100,9 +102,30 @@ (setq use-package-always-ensure t) (use-package exec-path-from-shell + :demand t :custom - (exec-path-from-shell-variables '("PATH" "MANPATH" "AWS_ACCESS_KEY_ID" "AWS_SECRET_ACCESS_KEY" "AWS_SESSION_TOKEN")) - :demand t) + (exec-path-from-shell-shell-name "/opt/homebrew/bin/fish") + (exec-path-from-shell-arguments '("-l")) + (exec-path-from-shell-variables + '("PATH" + "MANPATH" + "SHELL" + "EDITOR" + "NPM_TOKEN" + "GITHUB_COPILOT_TOKEN" + "NEW_RELIC_TOKEN" + "NEW_RELIC_ACCOUNT_NUMER" + "JIRA_TOKEN" + "JIRA_BASE_URL" + "AGENT_BROWSER_SKILLS_DIR" + "MIXPANEL_SERVICE_ACCOUNT_USERNAME" + "MIXPANEL_SERVICE_ACCOUNT_PASSWORD" + "GMAIL_MCP_CLIENT_ID" + "GMAIL_MCP_CLIENT_SECRET" + "ANDROID_HOME" + "AWS_ACCESS_KEY_ID" + "AWS_SECRET_ACCESS_KEY" + "AWS_SESSION_TOKEN"))) (exec-path-from-shell-initialize) @@ -147,9 +170,11 @@ (evil-global-set-key 'normal (kbd "gg") #'magit) (evil-global-set-key 'normal (kbd "rw") #'hgh/dired-this-directory) (evil-global-set-key 'normal (kbd "h") #'help-command) + (evil-global-set-key 'normal (kbd "M-y") #'yank-pop) (evil-global-set-key 'normal (kbd "w") evil-window-map) (evil-global-set-key 'normal (kbd "p") project-prefix-map) + (evil-global-set-key 'normal (kbd "t") tab-prefix-map) (evil-global-set-key 'visual (kbd "TAB") #'indent-region) (evil-global-set-key 'normal (kbd "]d") #'flymake-goto-next-error) (evil-global-set-key 'normal (kbd "[d") #'flymake-goto-prev-error) @@ -214,9 +239,9 @@ :config (push '(:language "jai" :type "function" - :supports ("ag" "grep" "rg" "git-grep") - :regex "\\bJJJ\\s*::" - :tests ("test ::")) + :supports ("ag" "grep" "rg" "git-grep") + :regex "\\bJJJ\\s*::" + :tests ("test ::")) dumber-jump-find-rules) (push '(:language "jai" :type "variable" @@ -370,3 +395,13 @@ '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" nil (window-parameters (mode-line-format . none))))) + +(use-package pi-coding-agent) + +(defun hgh/pi-coding-agent-new-tab () + "Start or focus pi-coding-agent in a new tab for the current project." + (interactive) + (let ((directory (pi-coding-agent--session-directory))) + (tab-bar-new-tab) + (let ((default-directory directory)) + (pi-coding-agent))))