In the process of getting sublimerepl working with my version of scheme, something seems to have broken.
However, everything seems to work:
- I get good syntax behavior for Scheme source files
- the proper repl launches and works with good highlighting of text in the repl
- I can send source selections to the repl and they run as expected
But, two message dialogs appear when I start SublimeText with an error relating to the syntax “package” thingee.
The message:
Error loading syntax file "Packages/Scheme.sublime-package": Error parsing plist xml: expected < in file Packages/Scheme.sublime-package on line: 1
I also get this message when I launch the Gambit repl even though the repl does launch and seems correct. I don’t know what file this one refers to
UPDATE: I got rid of this. This was a user settings file with bad, unnecessary content–I got rid of the file and got rid of the message.
Error trying to parse settings: Expected value in Packages/User/SublimeREPL.sublime-settings:2:1
There are many layers to this problem.
- I had to change the settings for SublimeRepl for Scheme because the old style Packages/Scheme/Scheme.tmLanguage (text mate packages) have been replaced with new style Scheme.sublime-package. For the Gambit version of Scheme, I have the following settings in SublimeRepl Main.sublime-menu. I am including the whole thing but I only changed settings for the 2nd “child” of Scheme, which I set to Gambit. I also changed the syntax map values to refer to the new syntax definition for Scheme, as the old tm version no longer exists.
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "R",
"id": "SublimeREPL",
"children":
[
{"caption": "Scheme",
"id": "Scheme",
"children":[
{"command": "repl_open",
"caption": "Scheme",
"id": "repl_scheme",
"mnemonic": "S",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "scheme",
"cmd": {"linux": ["scheme"],
"osx": ["scheme"],
"windows": ["scheme"]},
"soft_quit": "\nexit\n",
"cwd": "$folder",
"cmd_postfix": "\n",
"extend_env": {"INSIDE_EMACS": "1"},
"syntax": "Packages/Scheme.sublime-package"
}
},
{"command": "repl_open",
"caption": "Gambit",
"id": "repl_gambit",
"mnemonic": "G",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "scheme",
"cmd": {"linux": ["gosh", "-i"],
"osx": ["gsi", "-i"],
"windows": ["gosh", "-i"]},
"soft_quit": "\n(exit)\n",
"cwd": "$folder",
"cmd_postfix": "\n",
"extend_env": {"INSIDE_EMACS": "1"},
"syntax": "Packages/Scheme.sublime-package"
}
},
{"command": "repl_open",
"caption": "Petite Chez Scheme",
"id": "repl_petite",
"mnemonic": "P",
"args": {
"type": "subprocess",
"encoding": "utf8",
"external_id": "petite",
"cmd": {"linux": ["petite"],
"osx": ["petite"],
"windows": ["petite"]},
"soft_quit": "\n(exit)\n",
"cwd": "$folder",
"cmd_postfix": "\n",
"extend_env": {"INSIDE_EMACS": "1"},
"syntax": "Packages/Scheme.sublime-package"
}
}
]}
]
}]
}
]
- There are multiple package directories because I started back in the day of Sublimetext 2. Now I have multiple package directories across v 3 and v 4.
I have these package directories:
~/Library/Application Support/Sublime Text 3
which contains:
Installed Packages
and
Packages
and
/Applications/Sublime Text 4/Contents/MacOS/Packages
-
Probs 1 and 2 interact because the settings for SublimeRepl have a syntax entry. Since I don’t know what “Packages” maps to as there are 2 such directories (one for SublimeText 4 and one for SublimeText 3, which also supports v 4) I don’t know which one my running copy of SublimeText 4 sees. So, I put Scheme.sublime-package in both places.
-
The error message above refers to line 1 of the plist xml in Scheme.sublime-package. But, of course, I can’t actually see the plist because sublime-package files are compressed. I used PackageResourceViewer to extract the package. This expands the pieces, but the plist itself doesn’t appear because that’s what got “blown apart” into files and directories in the package (I am going to spare you listing all of those). All the pieces seem to be ok and seem to work as a language package.
So what does the error message refer to? What do I do to fix it? Is it a problem with the Packages directory configuration, something in SublimeRepl settings? Or something wrong with the syntax package?
Sorry for the long message, but SublimeText packages have become hairballs over the years.