Skip to content

Commit c38815f

Browse files
authored
Fix gptel-cpp-complete--get-treesit-extra-load-path not working.
1 parent cdf6a80 commit c38815f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

gptel-cpp-complete.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@
9595
;; ------------------------------------------------------------
9696
(defun gptel-cpp-complete--get-treesit-extra-load-path ()
9797
"Get `treesiter' extra load path."
98-
(list (expand-file-name
99-
"./" (file-name-directory
100-
(or load-file-name (buffer-file-name))))))
98+
(when-let ((lib (locate-library "gptel-cpp-complete")))
99+
(list (file-name-directory lib))))
101100

102101
(defmacro gptel-cpp-complete--with-which-function-mode (&rest body)
103102
"Execute BODY with `which-function-mode' enabled, then restore original state."

0 commit comments

Comments
 (0)