Install Visual Studio Code with LiaScript
- André Dietrich
- Article , Editor , Tutorial
- May 18, 2022
Due to some problems with package updates for Atom editor, we decided to created two LiaScript extensions for VSCode.
However, Atom can still be used to create LiaScript courses and from our point of view it is still the easier editor to learn (for more information follow this link). But, it is now also possible to develop courses and preview them with Visual-Studio-Code. The two extensions are similar to those we had developed for Atom, but with slight differences.
If you later want to publish your courses on GitHub or GitLab, you will have to download and install git at first:
Stay with the default settings and simply hit next until you reach the installation button.
Download and install VSCode from:
Open VSCode and go to the Extensions tab
Type
liascript
and click on install for the two modules:In order to enable the snippets, hit Ctrl+Shift+P to get to the fuzzy search and type
settings
to open the settings.json. Then copy the following code into the configuration file (into the braces):"[markdown]": { "editor.tabCompletion": "on", "editor.quickSuggestions": true, "editor.snippetSuggestions": "top" },
` Hit Ctrl+S to store this configuration
Close and reopen the VSCode again to load the settings.
You can now create a new folder and a course file with the ending
.md
. This ending says, that the file is of type Markdown, and it will use the appropriate syntax highlighting, and you can use the LiaScript snippets.Simply type
liainit
and hit enter. This will create a course stub, which can be used as a starting point for your course development.Whenever you type
lia
, a bundle of snippets will be presented to you. Use this to search for quizzes or any other stuff, it will provide you with an additional help, and inject the content for you.Keywords:
lia
: LiaScript basic helpvoice
: Search through all supported voiceshili
: Code highlighting for all supported programming languages
To open the preview-mode, simply hit Alt+L to open the development server in live-mode, or do a fuzzy search with Ctrl+Shift+P and then type `liascript to search through all settings.
Make changes and hit Ctrl+S to store the course content, which will trigger a reload of your entire course.
For navigating, simply press Ctrl and click onto the line to open the slide in the preview, or double onto the slide to move the cursor to the appropriate line within the editor.
The development-server will use your project-path as root. If no file is selected, the browser will open a file list, which depicts your entire project structure. Simply click onto one of the files to preview it.
If the updates in live mode are annoying, you can also stop the development server with Ctrl+Shift+P and by typing
liascriptstop
and hit enter. If you then perform the fuzzy search again or hit Shift+Alt+L, there is another option, which starts only the development server, but not in live mode. This way, you have to reload the preview manually.Text to speech output does not work in on the development server, but you can test your course also on the LiaScript project website. Again, Ctrl+Shift+P is our friend, type
liascripttest
and hit enter. This will serve the course from localhost, but will load this on the website. This is a good way to check your text-to-speech and also to check if all<iframe>
s and multimedia content gets loaded.Have Fun ;-)