# Clarion Extension
Table of Contents
Overview
Welcome to the Clarion Extension for VS Code! This extension enhances the functionality of the Fushnisoft Clarion Extension by providing powerful tools such as snippets, code folding, solution parsing, and enhanced navigation.
For a quick reference, check out the Cheat Sheet.
A special thanks to Mark Goldberg for his contributions to code folding and Allen Zhu for Document Outline support.
This is an active project looking for contributors!
This extension is under active development and we need your help! Whether you are a Clarion developer, a VS Code enthusiast, or just interested in open-source projects, your contributions, bug reports, and feedback are welcome. Check out our GitHub Issues to get involved!
Features
For a comprehensive list of all features and their locations within the extension architecture, see our Features Documentation.
- Solution Explorer View: Navigate Clarion projects directly inside VS Code.
- Automatic Solution Parsing: Detects all projects and redirection files in your solution.
- Enhanced "Go To Definition": Supports
INCLUDE
and MODULE
statements, with redirection-aware searches.
- Code Folding: Tokenizer-based folding provider for improved code readability.
- Hover Provider: Displays previews of referenced files when hovering over
INCLUDE
or MODULE
statements.
- Build Configuration Support: Easily switch between Release and Debug builds with
Clarion: Set Configuration
.
- Redirection-Aware File Searching:
Ctrl+P
respects local and global redirection files.
- Document Outlining & Breadcrumbs: Improves navigation within large Clarion files.
- Experimental Tokenizer: Future-ready for additional features like code formatting and diagnostics.
- New Document Formatter: Format Clarion source files with
Shift+Alt+F
.
- Token Caching: Improves performance by caching tokens unless the document changes.
- Updated Folding and Symbol Provider: Provides better structure recognition.
- Welcome Screen: Easily open or reopen Clarion solutions in your workspace.
- Multi-Solution Workspace Support: Open and manage multiple Clarion solutions in the same VS Code workspace.
- Clarion Tools Sidebar: A dedicated view in the activity bar for managing solutions, projects, and files.
- View Filtering: Filter Solution View and Structure View for easier navigation in large projects.
- File Management: Add or remove CLW files to/from projects directly from the Solution View.
- Variable Prefix Highlighting: Automatically highlights variables with user-defined prefixes (e.g., LOCS:, GLOS:) with configurable colors. Requires additional color customization settings.
Installation
Requirements
- Visual Studio Code (latest version recommended)
- Fushnisoft Clarion Extension (as a base language extension)
Install from the Marketplace.
Installation Steps
- Open Visual Studio Code.
- Go to the Extensions Marketplace (
Ctrl+Shift+X
).
- Search for Clarion Extension.
- Click Install.
- Restart VS Code if needed.
- Identifier:
msarson.clarion-extensions
- Version:
0.5.6
- Published: 2018-08-19
- Last Release: 2025-04-04
View on Marketplace
Changelog (What's New in v0.5.6)
Enhancements
Unified Highlighting System: Added a comprehensive highlighting system for Clarion code elements with a unified configuration structure.
To use this feature:
Configure highlighting options in your settings.json:
"clarion.highlighting": {
// Enable/disable all highlighting features
"enabled": true,
// Variable prefix highlighting settings
"prefix": {
// Define prefixes with simple colors or advanced styling
"patterns": {
// Simple color
"LOCS": "#ffffcc",
// Advanced styling
"GLOS": {
"color": "#ccffff",
"fontWeight": "bold",
"backgroundColor": "#f0f0f0",
"before": {
"contentText": "→",
"color": "#888888"
}
}
}
},
"comment": {
// Define comment patterns with simple colors or advanced styling
"patterns": {
// Simple color
"TODO": "#ff8c00",
// Advanced styling
"FIXME": {
"color": "#ff0000",
"fontWeight": "bold",
"backgroundColor": "#fff0f0",
"before": {
"contentText": "⚠️ ",
"color": "#ff0000"
},
"after": {
"contentText": " ⚠️",
"color": "#ff0000"
}
}
}
}
}
Use VS Code's built-in color picker by clicking on the color values in the settings UI
Optionally disable all highlighting with: "clarion.highlighting.enabled": false
The extension will automatically apply the selected styles to variables with matching prefixes in your code, and any comment line starting with !
followed by one of your defined patterns (with or without a space) will be highlighted.
Changelog (What's New in v0.5.5)
Enhancements
- Improved Symbol Provider: Major updates to the symbol provider for better code navigation and structure representation.
- View Filtering: Added filtering capabilities to Solution View and Structure View for easier navigation in large projects.
- File Management: Added option to add or remove CLW files to/from projects.
Bug Fixes
- Symbol Placement: Fixed issues with symbols not being placed correctly in the document outline.
- Label Formatting: Fixed issues with labels not adding spaces between parameters.
- Procedure Labels: Resolved issues with procedure labels in methods.
- Import Locations: Fixed textdocument coming from new import location.
- File Redirection: Refactored file locations to use redirection as the default approach.
Changelog (What's New in v0.5.3)
BUG
- V0.5.2 was not working when shipped: Updated .vscodeignore as it was not publishing packages required for extension
Changelog (What's New in v0.5.4)
Bug Fix
- Missing Packaged Files: Fixed an issue where critical files were excluded due to an incorrect setting in
.vscodeignore
, causing required modules not to be bundled with the extension.
New
- Clarion Tools View: A new sidebar view titled Clarion Tools is now available in the Activity Bar for quick access to solutions and features.
- Welcome Screen: Improved user experience with a welcome screen for opening or reopening Clarion solutions.
- Multi-Solution Support: Workspaces can now contain multiple Clarion solutions.
Fixes
- Build Actions: Fixed issues where Build Solution and Build Project could fail unexpectedly.
- Problem Panel Integration: Compilation problems are now correctly displayed in the Problems panel.
- Solution Closing: You can now close solutions from the Solution View.
Changelog (What's New in v0.5.2)
Added
- COLOR Keyword Enhancement: Added color patch visualization and color picker for COLOR keywords.
- Solution Parsing Refactoring: Moved client-side solution parsing to the language server side for improved performance and reliability.
- Quick Open Improvements: Enhanced Ctrl+P quick open functionality for better file navigation.
Changelog (What's New in v0.5.1)
Bug Fixes and Feature Improvements
- Fixed folding behavior: Resolved an issue where
MODULE
was incorrectly detected as a foldable region within class definitions.
- Enhanced symbol provider: Major improvements to the Outline view, with better symbol organization and handling for various Clarion structures.
Changelog (What's New in v0.5.0?)
Added
- Complete re-write of redirection handling for better solution and project parsing.
- Status Bar Configuration Switching: Users can now change build configurations (
Release
, Debug
, etc.) directly from the VS Code status bar.
- Solution Explorer View Enhancements: Projects are now properly structured under solutions.
- Context Menu for Compilation: Right-click to compile solutions/projects.
- Build via
Ctrl+Shift+B
: If multiple projects exist, users will be prompted to choose.
- New Document Formatter (
Shift+Alt+F
) for source code formatting.
- Token Caching to improve performance.
- Updated Folding Provider with better structure handling.
- Improved Symbol Provider (though more work is needed, contributions welcome!).
Changed
- Updated Symbol Provider: Still needs work, but improvements have been made.
- Folding Provider is more stable: Should handle complex code better.
Fixed
- General stability fixes across the extension.
Getting Started
For a comprehensive guide on using all features of the Clarion Extension, please refer to our Getting Started Guide.
Opening a Clarion Solution in VS Code
Open the Solution Folder
- Open the root folder where your
.sln
file is located.
Select the Clarion Properties File
- Open the Command Palette (
Ctrl+Shift+P
).
- Search for "Clarion: Open Solution".
- Choose
ClarionProperties.xml
from %appdata%\SoftVelocity\ClarionVersion\ClarionProperties.xml
.
Select the Clarion Version
- Choose the Clarion version used for compilation.
(Optional) Save Workspace
- Save the workspace for easier future access.
Troubleshooting
Snippet Descriptions Not Showing?
If snippets are not appearing correctly, update your VS Code settings:
"editor.snippetSuggestions": "top",
"editor.suggest.showSnippets": true,
"editor.suggest.snippetsPreventQuickSuggestions": false
Contributing and Feedback
This is an active open-source project that needs community help! 🚀
- Report issues: GitHub Issues
- Submit pull requests: Contributions are welcome!
- Join the discussion: Share your ideas on improving the extension.
If you use this extension and find it useful, please consider contributing back! 💙
Acknowledgments
This extension builds upon the work of:
- Mark Goldberg – Code folding.
- Allen Zhu – Document Outline support.
- Brahn Partridge (1974–2021) – Early work on textmate language definitions.
Additional Resources
📚 Getting Started Guide – Comprehensive guide to all extension features.
📚 Cheat Sheet – Quick reference for features and usage.
Features Documentation
📚 Features Documentation – Detailed overview of all extension features and their implementation.
Thank you for using Clarion Extension! 🎉