Closed JimiC closed 7 years ago
Both, scpt
and scptd
, are binary AppleScripts that can't be opened by Visual Studio Code at this moment. Once Microsoft exposes an event to manipulate a file prior to opening (e.g. a load-equivalent to onWillSaveTextDocument
), I will add support these formats.
Edit: I wonder if onWillSaveTextDocument
has been removed recently, since it's no longer listed in the API documentation
Fair enough. What about camelCase AppleScript?
Are you sure it's necessary to support both, .applescript
and .AppleScript
? Syntax is already highlighted properly for both cases. I don't mind adding it, but it seems language detection is already case-insensitive.
It may has to do with vscode detection. Haven't checked it to be honest. I'll verify it and come back to you.
Come to think of it again my request isn't so much about highlighting as to associate those extensions with an icon. In case they won't be added we will have to associate them manually.
From what I know Mac and Linux are case-sensitive when it comes to file naming so I don't think vscode
diverge from that. It will take me some time to return home to my Mac machine to verify my case.
Not sure why my version of vscode-nsis
doesn't show any icon for AppleScript, but I tested it using NSIS:
@idleberg The thing is that @robertohuertasm has mistakenly associated the applescript
icon with the .app
extension. I'm going to fix that in the upcoming version by supporting it via language id
. If your extension
doesn't include .scpt
and .scptd
we will have to explicitly add them in the declaration.
Regarding the case-sensitivity I tested on Linux and it's as you say, so we are good on that front.
Edit: Indeed it's a trivial issue for you, but I would like to know so we to act accordingly.
Just to mention it: a special case is an .app
created with AppleScript. The AppleScript Editor can load these again for editing since they are basically just an Application folder bundling the script (<appname>/Contents/Resources/Scripts/main.scpt
) and several resources. Since it won't be applicable to make a difference between a standard application and an AppleScript application, .app
should generally use the icon designed for applications. I guess, that a prior version of vscode-icons
used the Apple icon for both, AppleScript and macOS applications.
As for scpt
and scptd
, you could go on and include both extensions as binary files. Once Visual Studio Code can process files prior to loading them in the editor (e.g. for decoding binary AppleScript bundles), we can change that icon to AppleScript.
.app
will be moved to binary
icon..scpt
and .scptd
to the binary
icon.Thanks a lot for your input.
According to wikipedia
.scpt, .scptd, .AppleScript
are also valid file extensions.We are going to support
applescript
vialanguage id
invscode-icons
.