emacs-gdscript-mode
emacs-gdscript-mode copied to clipboard
fix: remove extra /godot from osx/windows config path
https://github.com/godotengine/emacs-gdscript-mode/pull/138 was a good step, but the darwin and windows paths were not quite right when combined with the editor-settings path below - it was digging into an extra '/godot' directory and never finding the settings. This lifts that 'godot/' dir to only the linux system type.
The docs for the paths are here: https://docs.godotengine.org/en/stable/tutorials/io/data_paths.html#editor-data-paths
Eglot now starts automagically for me on osx! yay!
On windows, expand-file-name not handle "%APPDATA%" style env in right way, but substitute-in-file-name works. Here is example:
(let ((dir "%APPDATA%\\Godot\\")
(fix (substitute-in-file-name "$APPDATA/Godot/")))
(format "%s\n%s"
(expand-file-name "editor_settings.tres" dir)
(expand-file-name "editor_settings.tres" fix)))
The output is below, "c:/Users/k/scoop/persist/kshome/.emacs.d/elpa/gdscript-mode-20240509.1523/" is working directory.
c:/Users/k/scoop/persist/kshome/.emacs.d/elpa/gdscript-mode-20240509.1523/%APPDATA%/Godot/editor_settings.tres c:/Users/k/AppData/Roaming/Godot/editor_settings.tres
So change "%APPDATA%\\Godot\\" to (substitute-in-file-name "$APPDATA/Godot/") maybe correct.
-- Sorry for my poor english.
Not sure why this wasn't merged, but :shrug:
Closing in favor of #156 which looks like a better (and more up-to-date) implementation.
Sorry this didn't get merged before. This repository has a benevolent community maintainer who might not have been available to review and merge at the time. Generally, a lot of what you see in these FOSS organizations is benevolent, done in people's free time, as time allows, just like contributions.
Thanks for the reply! Sorry for the attitude in my comment 🤦♂️
I'm super appreciative of this tool and the community and individuals supporting it! Especially this rare cross-section of godot + emacs folks 🤓
No worries, and thanks for the appreciation!