Merge pull request #138 from xiliuya/add-macos-config-support

Set darwin's eglot config dir
This commit is contained in:
Nathan Lovato
2024-05-09 17:23:16 +02:00
committed by GitHub
2 changed files with 9 additions and 3 deletions

View File

@@ -52,7 +52,11 @@ definitions of HOST, PORT, and INTERACTIVE.
For more context, see
https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-04/msg01070.html."
(save-excursion
(let* ((cfg-dir (or (getenv "XDG_CONFIG_HOME") "~/.config"))
(let* ((cfg-dir (or (getenv "XDG_CONFIG_HOME")
(pcase system-type
('darwin "~/Library/Application Support/Godot/")
('windows-nt "%APPDATA%\\Godot\\")
('gnu/linux "~/.config/"))))
(cfg-buffer
(find-file-noselect
(expand-file-name

View File

@@ -56,8 +56,10 @@
;;;###autoload
(with-eval-after-load 'eglot
(defvar eglot-server-programs)
(push (cons 'gdscript-mode #'gdscript-eglot-contact)
eglot-server-programs))
(unless (equal (alist-get 'gdscript-mode eglot-server-programs)
#'gdscript-eglot-contact)
(push (cons 'gdscript-mode #'gdscript-eglot-contact)
eglot-server-programs)))
(defvar gdscript-mode-map (let ((map (make-sparse-keymap)))
;; Movement