PSL Language Support for VS Code

PSL Language Support is an extension that accelerates development speed and documentation lookup when working with the PSL (Profile Script Language) language. This extension provides convenient code snippets and detailed hover information features.
✨ Main Features
1. Code Snippets
Automatically suggests and inserts common PSL code structures, helping you type code faster and with fewer errors.
- Supports basic control flow blocks (loops, conditions).
- Standard PSL function and variable definitions.
Hover over any PSL keyword, function, or variable to instantly view the documentation.
- View syntax.
- View functional descriptions and usage examples.
3. Click routines (Ctrl+Click on functions/routines)
Use the Ctrl + Right Click combination to jump to the target function/routine.
- Forward to functions/routines. The first search will be cached to disk. Instructions on toggling Project/Workspace scope are at the bottom. Changing the scope will reset the cache.
🚀 Installation
- Open Visual Studio Code.
- Search for "PSL Recommendation" on the Extension Marketplace and click Install.
- Restart VS Code if necessary.
📖 User Guide
Using Snippets
Simply type a part of the keyword, and the suggestion list will appear. Press Tab or Enter to insert the code.
Example:
- Type
table -> Generates a table definition template (.TBL).
- Type
column -> Generates a column definition template (.COL).
Using Hover
📋 Snippets List (Cheat Sheet)
Below is the list of supported abbreviations (prefixes):
| Prefix | Description | Output (Example) |
| :--- | :--- | :--- |
// some template examples
| fu | Function |
|
| table | Table |
|
| column | Column |
|
// some statement examples
| t | Basic | type |
| tr | Basic | true |
| S | Basic | String |
| N | Basic | Number |
| D | Basic | Date / Db / DbSet |
| R | Basic | Record / ResultSet / Runtime |
| f | Loop | for (condition) do {} |
| c | Catch declaration | catch error {} |
| i | Conditional statement | if {} |
| e | Conditional statement | else if {} |
| w | Loop | while (condition) do {} |
// keyword examples
| % | Keyword | %SystemDate / %Identifier / %UserID |
// method examples
| Db. | Method | currVal(${1:table}, ${2:accessKeys}) / getRecord(${1:table}, ${2:accessKeys}, ${3:classNew}) |
// variable examples
type ResultSet abc
| abc. | Method | next() / .getCol(${1:columnNumber} |
And so on
Click routines (Ctrl+Click on functions/routines)
Click on any function regardless of whether it is in the same file or a different file; if it does not exist, it will not jump to another location.
⚙️ Extension Configuration
This extension works out of the box without requiring complex configuration. However, you can customize the following settings in your settings.json:

{
"psl.hover.enable": true, // Enable/Disable Hover feature
"psl.snippets.enable": true, // Enable/Disable Snippets feature
"psl.scope.enable": true // If enabled, only scans definition files within the current project folder. If disabled, scans the entire workspace. Toggling this will reset the search routines cache!
}