Skip to content

Commit bee7f99

Browse files
authored
Merge pull request godotengine#156 from katomuso/fix-config-dir
Fix config directory in gdscript-eglot-contact
2 parents 52b3637 + d1076e1 commit bee7f99

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

gdscript-eglot.el

+11-11
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ definitions of HOST, PORT, and INTERACTIVE.
5252
For more context, see
5353
https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-04/msg01070.html."
5454
(save-excursion
55-
(let* ((cfg-dir (or (getenv "XDG_CONFIG_HOME")
56-
(pcase system-type
57-
('darwin "~/Library/Application Support/Godot/")
58-
('windows-nt "%APPDATA%\\Godot\\")
59-
('gnu/linux "~/.config/"))))
60-
(cfg-buffer
61-
(find-file-noselect
62-
(expand-file-name
63-
(format "godot/editor_settings-%s.tres"
64-
gdscript-eglot-version)
65-
cfg-dir)))
55+
(let* ((cfg-dir (pcase system-type
56+
('darwin "~/Library/Application Support/Godot/")
57+
('windows-nt (substitute-in-file-name "$APPDATA/Godot/"))
58+
('gnu/linux (file-name-concat
59+
(or (getenv "XDG_CONFIG_HOME") "~/.config/")
60+
"godot"))))
61+
(cfg-buffer (find-file-noselect
62+
(file-name-concat
63+
cfg-dir
64+
(format "editor_settings-%s.tres"
65+
gdscript-eglot-version))))
6666
(port
6767
(with-current-buffer cfg-buffer
6868
(goto-char 0)

0 commit comments

Comments
 (0)