Skip to content

Commit

Permalink
Merge pull request #156 from katomuso/fix-config-dir
Browse files Browse the repository at this point in the history
Fix config directory in gdscript-eglot-contact
  • Loading branch information
NathanLovato authored Nov 4, 2024
2 parents 52b3637 + d1076e1 commit bee7f99
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions gdscript-eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ 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")
(pcase system-type
('darwin "~/Library/Application Support/Godot/")
('windows-nt "%APPDATA%\\Godot\\")
('gnu/linux "~/.config/"))))
(cfg-buffer
(find-file-noselect
(expand-file-name
(format "godot/editor_settings-%s.tres"
gdscript-eglot-version)
cfg-dir)))
(let* ((cfg-dir (pcase system-type
('darwin "~/Library/Application Support/Godot/")
('windows-nt (substitute-in-file-name "$APPDATA/Godot/"))
('gnu/linux (file-name-concat
(or (getenv "XDG_CONFIG_HOME") "~/.config/")
"godot"))))
(cfg-buffer (find-file-noselect
(file-name-concat
cfg-dir
(format "editor_settings-%s.tres"
gdscript-eglot-version))))
(port
(with-current-buffer cfg-buffer
(goto-char 0)
Expand Down

0 comments on commit bee7f99

Please sign in to comment.