can't load syntax
boneskull opened this issue · comments
Hi,
The syntax.txt
file packaged with the macOS distributable doesn't seem to load; I get "Failed to load custom syntax!"
So, I'm trying to load a custom syntax:
break,aliceblue,
case,aliceblue,
catch,aquamarine,
const,cornflower,
continue,cornflower,
default,aliceblue,
delete,deeppink,
do,blueviolet,
else,blueviolet,
finally,aquamarine,
for,blueviolet,
function,aliceblue,
if,blueviolet,
in,hotpink,
instanceof,deeppink,
let,cornflower,
new,seagreen,
return,seagreen,
switch,aliceblue,
this,seagreen,
throw,aquamarine,
try,aquamarine,
typeof,deeppink,
var,cornflower,
void,seagreen,
while,blueviolet,
with,hotpink
Should the above work? I've tried both LF and CRLF line-endings.
i think it's because of how this gets packaged for an OS X binary... it actually works fine if I copy the syntax.txt into the underlying package first (doesn't seem like it picks it up if it's just a symlink though).
cp syntax.txt TEXTREME.app/Contents/MacOS/syntax.txt
probably this: https://github.com/memetrooper/TEXTREME/blob/master/Base.gd#L84
maybe it needs to do like a ../../../
on that for it to work? or maybe godot has a workaround or update for dealing with something like this.
I just created a symbolic link to my syntax file in the TEXTREME.app so I can have easier access to the syntax file while still making it load.
PR #12 fixes this issue. I feel that it needs to be merged to prevent this in future.