all repos — nixfiles @ 2264ae0becd3f21c469ad2c801af074810de6540

System and user configuration, managed by nix and home-manager

emacs: polyfill `project-name` for eglot
Alan Pearce alan@alanpearce.eu
Sat, 01 Apr 2023 18:54:05 +0200
commit

2264ae0becd3f21c469ad2c801af074810de6540

parent

a3018e42941249ef2f03bf61d14e7dc6511ace78

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -1017,6 +1017,9 @@ (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