diff --git a/init.el b/init.el index 33f26c7..e42c36c 100644 --- a/init.el +++ b/init.el @@ -1,4 +1,4 @@ -;;; init.el --- -*- lexical-binding: t; -*- +;; init.el --- -*- lexical-binding: t; -*- ;; Use this at the top of your .emacs file for local overrides: ;; (let ((init "~/.emacs.d/init.elc")) @@ -44,16 +44,9 @@ ;; Some legacy shit. (setopt sentence-end-double-space nil) -(defun foehammer--backup-file-name (fpath) - "Return a new file path of a given file path. -If the new path's directories does not exist, create them." - (let* ((backupRootDir "~/.emacs.d/emacs-backup/") - (filePath (replace-regexp-in-string "[A-Za-z]:" "" fpath )) ; remove Windows driver letter in path - (backupFilePath (replace-regexp-in-string "//" "/" (concat backupRootDir filePath "~") ))) - (make-directory (file-name-directory backupFilePath) (file-name-directory backupFilePath)) - backupFilePath)) - -(setopt make-backup-file-name-function 'foehammer--backup-file-name) +;; Fix backups. +(setq backup-directory-alist + `(("." . ,(concat user-emacs-directory "backups")))) ;; Globally escape. (global-set-key (kbd "") 'keyboard-escape-quit) @@ -204,6 +197,13 @@ If the new path's directories does not exist, create them." (use-package rust-mode :ensure t) +(use-package protobuf-mode + :ensure t) + +;; Use python-mode for .bazel files +(add-to-list 'auto-mode-alist '("\\.bazel\\'" . python-mode)) +(add-to-list 'auto-mode-alist '("\\(BUILD\\|WORKSPACE\\|MODULE\\)\\'" . python-mode)) + (use-package emacs :config ;; Treesitter gramar remap. @@ -251,6 +251,14 @@ If the new path's directories does not exist, create them." (keymap-set eshell-mode-map "C-r" 'consult-history)) :hook ((eshell-mode . foehammer/setup-eshell))) +(use-package claude-code-ide + :vc (:url "https://github.com/manzaltu/claude-code-ide.el" :rev :newest) + :bind ("C-c '" . claude-code-ide-menu) ; Set your favorite keybinding + :custom + (claude-code-ide-terminal-backend 'eat) + :config + (claude-code-ide-emacs-tools-setup)) + ;; Eat: Emulate A Terminal (use-package eat :ensure t @@ -260,9 +268,6 @@ If the new path's directories does not exist, create them." (eat-eshell-mode) (eat-eshell-visual-command-mode)) -(use-package elcord - :ensure t) - ;; Don't change this (or else gg). (custom-set-variables ;; custom-set-variables was added by Custom. @@ -270,10 +275,13 @@ If the new path's directories does not exist, create them." ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages - '(company consult corfu-candidate-overlay corfu-terminal eat - edit-indirect elcord evil flycheck gruvbox-theme - json-mode kbd-mode lsp-mode magit marginalia nix-mode - projectile rust-mode vertico yaml-mode))) + '(claude-code-ide company consult eat elcord evil flycheck + gruvbox-theme json-mode magit marginalia + markdown-mode nix-mode projectile protobuf-mode + rust-mode vertico vterm which-key yaml-mode)) + '(package-vc-selected-packages + '((claude-code-ide :url + "https://github.com/manzaltu/claude-code-ide.el")))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.