HyperScript for VS Code
An extension for Visual Studio Code that knows HyperScript: colours, completion, the documentation one hover away, and mistakes underlined as you type, found by the same reader your server uses.
Installing it
- Download the file above. It ends in
.vsix. - In VS Code, open the Extensions view, click the ... at its top right, and choose Install from VSIX.... Pick the file.
- Open a
.hsfile. The bottom right of the window says HyperScript.
Or from a terminal: code --install-extension hyperscript-vscode-1.0.24.vsix
What it does
- Colours for commands, events, statements, text,
{variables},%placeholders%and&colour codes. - Completion. At the start of a line it offers the statements; after
onthe events; inside text after%the placeholders; elsewhere values, conditions and functions. Each comes with what it does and an example, and fills in with blanks to step through with Tab. The syntax of the addons is known too. - Hover. Point at the first words of a line, an event, a function or a placeholder to read what it does, with a link to its place in the Docs.
- Mistakes as you type, with the message the server would give:
Unknown block 'dimond block'. Did you mean 'diamond block'?Where the message says what was meant, the light bulb changes it for you. - An outline of every command, event, function and timer of a script.
- Snippets for a command, an event, a timer, a function and a menu.
Good to know
- Finding mistakes needs Java on your computer, 8 or newer. Everything else works without it.
- Nothing you write is sent anywhere: the reading is done on your computer.
- A script that uses an addon is not checked, because only a server with the addon knows its words. Say so at the top with
# Addons: HyperGuardand the editor leaves it alone. .hsis also the ending of Haskell files. With a Haskell extension installed, pick HyperScript at the bottom right of the window.- It is not on the Visual Studio Marketplace yet; this page is where it is.