mirror of
https://github.com/godotengine/emacs-gdscript-mode.git
synced 2025-12-31 21:48:34 +03:00
Merge pull request #138 from xiliuya/add-macos-config-support
Set darwin's eglot config dir
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user