summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2023-04-01 18:54:05 +0200
committerAlan Pearce2023-04-01 18:54:05 +0200
commit2264ae0becd3f21c469ad2c801af074810de6540 (patch)
treee9f67f4a434012ccaca2e6e8abc8800bb86f329a /user
parenta3018e42941249ef2f03bf61d14e7dc6511ace78 (diff)
downloadnixfiles-2264ae0becd3f21c469ad2c801af074810de6540.tar.lz
nixfiles-2264ae0becd3f21c469ad2c801af074810de6540.tar.zst
nixfiles-2264ae0becd3f21c469ad2c801af074810de6540.zip
emacs: polyfill `project-name` for eglot
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index f64bb226..f673b38c 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -1017,6 +1017,9 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package tree-sitter-indent
   :ghook ('(rustic-mode-hook)))
 
+(unless (fboundp 'project-name)
+  (defun project-name (project)
+    (file-name-base (cdr project))))
 (use-package eglot
   :general (:states 'normal :keymaps 'eglot-mode-map
                     "gd" #'xref-find-definitions