summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/init.el35
-rwxr-xr-xuser/emacs/raycast-script.applescript2
2 files changed, 11 insertions, 26 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index b666e033..69c71d00 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -582,29 +582,6 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
             (setq kind-icon-default-face 'corfu-default)
             (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)))
 
-(use-package tabnine-core
-  :config (progn
-            (setq tabnine-binaries-folder "~/.local/tabnine")
-            (with-demoted-errors "TabNine error: %s"
-              (when (tabnine--executable-path)
-                (global-tabnine-mode)))
-
-            (define-key tabnine-completion-map (kbd "TAB") #'tabnine-accept-completion)
-            (define-key tabnine-completion-map (kbd "<tab>") #'tabnine-accept-completion)
-
-            (define-key tabnine-completion-map (kbd "M-f") #'tabnine-accept-completion-by-word)
-            (define-key tabnine-completion-map (kbd "M-<return>") #'tabnine-accept-completion-by-line)
-            (define-key tabnine-completion-map (kbd "C-e") #'tabnine-accept-completion-by-line)
-            (define-key tabnine-completion-map (kbd "<right>") #'tabnine-accept-completion-by-line)
-
-            (define-key tabnine-completion-map (kbd "C-g") #'tabnine-clear-overlay)
-            (define-key tabnine-completion-map (kbd "M-[") #'tabnine-next-completion)
-            (define-key tabnine-completion-map (kbd "M-]") #'tabnine-previous-completion))
-  :init (progn
-          (advice-add 'tabnine-start-process :around #'quiet)
-
-          (add-hook 'kill-emacs-hook #'tabnine-kill-process)))
-
 (use-package tempel
   :general ("M-+" #'tempel-complete ;; Alternative tempel-expand
             "M-*" #'tempel-insert
@@ -689,7 +666,7 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
 
 (setq dired-dwim-target t
       dired-recursive-copies 'top
-      dired-listing-switches "-alh --group-directories-first"
+      dired-listing-switches "-alh"
       dired-kill-when-opening-new-dired-buffer t
       dired-recursive-deletes (if delete-by-moving-to-trash
                                   'always
@@ -997,13 +974,21 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
   :config (progn
             (treemacs-load-theme "simple")))
 
+(defun ap/consult-ghq-switch-project (dir)
+  "Append a slash to avoid project.el remembering two different
+paths for the same project."
+  (interactive)
+  (project-switch-project (if (string-suffix-p "/" dir)
+                              dir
+                            (concat dir "/"))))
 (use-package consult-ghq
   :defer 5
   :general (:keymaps 'project-prefix-map
                      "o" #'consult-ghq-switch-project)
   :config (progn
             (setq consult-ghq-grep-function #'consult-grep
-                  consult-ghq-find-function #'consult-find)))
+                  consult-ghq-find-function #'consult-find
+                  consult-ghq-switch-project-function #'ap/consult-ghq-switch-project)))
 
 (use-package envrc
   :defer 2
diff --git a/user/emacs/raycast-script.applescript b/user/emacs/raycast-script.applescript
index 7fd64fbb..0d9a0bd8 100755
--- a/user/emacs/raycast-script.applescript
+++ b/user/emacs/raycast-script.applescript
@@ -6,7 +6,7 @@
 # @raycast.mode silent
 
 # Optional parameters:
-# @raycast.icon https://www.gnu.org/software/emacs/images/emacs.png
+# @raycast.icon /Users/alan/.config/emacs/emacs.icns
 # @raycast.packageName Emacs
 
 do shell script "$SHELL -c \"open -a ~/.local/state/nix/profile/Applications/Emacs.app\""