Ciao Prolog Language Support for Visual Studio CodeThis extension enhances Visual Studio Code with robust language support for Ciao Prolog, making it easier to write, edit, debug and analyze Ciao Prolog code. Table of Contents
Installation (Windows)To use this extension on Windows, follow these steps, which include setting up Windows Subsystem for Linux (WSL):
Installation (Linux and macOS)On Linux and macOS, you can install this extension and Ciao Prolog directly in Visual Studio Code without the need for additional setup.
Installing Ciao Prolog from Visual Studio Code
FeaturesSyntax HighlightingThe extension provides comprehensive syntax highlighting for Ciao Prolog. It also offers the ability to override color rules with official Ciao Prolog syntax coloring rules using a certain command. For more information on customizing syntax highlighting, see customizing syntax highlighting. Snippet CompletionThe extension includes a collection of predefined code snippets to help users insert common code structures in Ciao Prolog files. This feature speeds up coding by allowing users to quickly insert templates for common patterns. Language ConfigurationThe extension includes various language configuration features for enhanced editing and coding experiences:
Ciao Top LevelThe extension introduces an integrated Ciao Top Level within the Visual Studio Code window. It allows you to interact with the Ciao Prolog interpreter, providing advanced features and control, including syntax coloring, debugging, and more. Sending Commands to the Top LevelUsers can send the most useful commands to the Ciao Top Level by clicking on a series of special buttons that are available when focused on a Ciao Prolog file.
Note: All this buttons are associated with its corresponding command that is also available using the Visual Studio Code Command Palette Also, there exist many other commands that are not available via buttons and must be used by invoking commands available in the Visual Studio Code Command Palette. Some of the available commands include:
For a quick guide to interact with the Visual Studio Code Command Palette, see working with the command palette For a complete list of the Ciao Top Level commands, please check out the Marking Errors on SourceWhen you load a module into the Ciao Top Level, the extension automatically marks errors detected in the process. Warnings are displayed with a yellow wavy underline, and errors are displayed with a red wavy underline. These diagnostics also include a brief explanation of the problem that was found. Analyzing the Current FileYou can statically analyze the current module using CiaoPP and view the output besides the current module. Assertion checks are marked on source. VeriflyThis VSCode extension enhances your coding experience by providing real-time verification and/or linting as you develop Ciao Prolog systems. Which will help you find possible errors and warnings as you are coding! See configure verifly. Generating and Displaying DocumentationThe extension supports generating and displaying documentation using LPdoc, the documentation generator for Ciao Prolog. Users can generate and access preliminary documentation in a temporary directory before deciding to generate it in the current working directory. Opening the Current File in the Ciao PlaygroundWith a simple command, you can open the current Ciao Prolog file in a Ciao Playground tab in your web browser. This feature allows for convenient editing and sharT ng of code. Please note that there is a maximum URL length (2048 in the worst case), and files exceeding this length will show an error message. For details on using this feature. Source DebuggerWhen debugging a Ciao Prolog file, every step taken by the debugger is marked with a blue line in the source code. This visual indication helps users track the debugger's progress and location. For more on using the source debugger. Change Ciao Prolog VersionIt is possible to choose which version of Ciao Prolog is used when creating a Ciao Top Level. By default, the extension looks for all the directories under
CiaoPP MenuYou can open the CiaoPP for customizing the flags that will be used by
These features make the Ciao Prolog Language Support extension a powerful tool for developing Ciao Prolog applications in Visual Studio Code. To learn more about each feature, refer to the respective sections linked above. UsageWorking with the Command PaletteThe natural and more convenient way to work with this extension is by using the Visual Studio Code command palette. To access the Command Palette in Visual Studio Code and select extension commands, follow these simple steps:
This simple process allows you to quickly access and use the various commands provided by the Ciao Prolog Language Support extension within Visual Studio Code. Customizing Syntax HighlightingBy default, the syntax coloring of Ciao Prolog Files follow the coloring rules of the current Visual Studio Code editor theme. However, if you want to use the official Ciao Prolog coloring rules, you can activate them by following these steps:
In case you want to disable them, just execute the command:
Configuring VeriflyBy default, verifly comes deactivated. You can activate it through Visual Studio Code Configuration as follows:
|