Proclaim Maths Script VSCode Language Extension
A Visual Studio Code Language Server Extension
for Eclipse Proclaim Maths Script
(C) Burnside Consulting Ltd 2019
- Syntax highlighting, including Proclaim Maths Keywords featured in versions up to 3.4.02
- IF THEN ELSE code folding and indentation
- Snippets framework for example maths layouts
- OUTLINE Symbol detection for DB fields, variables and strings
- Basic Syntax Checking - list all DB fields, variables and strings (helpful in spotting typos)
- Basic Outline Symbol detection
- Basic Outline Symbol detection
This extension is available on the Visual Studio Code Marketplace.
Search for "Proclaim Maths"
To install a development version directly from the GIT respository files:
- Create a directory %userprofile%/.vscode/extensions/proclaimscript
- Copy/clone contents of this repository into it, restart VSCode
- Create a blank file, and save it with extension .pro (or load one previously saved from Proclaim Maths editor). The syntax highlighter will then recognise and parse the code.
Written on VS Code version 1.36.0 Node.js 10.11.0.
(click on View->Extensions, then the settings 'gear' next to Proclaim Maths Script extension)
if true, then a new tab is opened called 'syntaxcheck' that lists all DB fields, variables and strings.
if true, then the syntax check tab is only opened/refreshed when you click the QuickAction lighbulb inline and choose 'Check Syntax'
- IF ELSE autocompletion competition with C/C++ LSP makes writing IF ELSE blocks a little clunky
- autocomplete / folding of IF ELSE is case sensitive.
- unknown handling of multiple .pro files open in one editor
- (DEV) if you modify the pro.tmLanguage.json in the client, you must copy the file to the /server/src location too
See CHANGELOG.md for recent changes, or Git repository for more detail
First release 0.1.1 on 13/08/2019
- have the server receive the tmLanguage.json from the client in order to parse symbols on the server (define symbols on server?)
- theme/colouring to match Proclaim editor when VSCode theme is white background
- more snippets for sample keywords, based on Example Maths from ProclaimForum.co.uk
- Intellisense / autocomplete for inline help for keywords
~~* improve DocumentSymbol parsing to include variables.~~
- 'Problems' LSP for e.g. mismatched braces
~~* create new Command to replicate the old 'syntax check' output that displays a summary of all DB fields, variables and strings.~~
- hook into live Proclaim system to syntax check DB field names
- autocapitalise keywords
- remove remnants of example LSP framework
Pull requests welcomed
- Syntax highlighting rules are defined in pro.tmlLanguage.json
- Indentation rules are defined in language-configuration.json
- Snippets (sample code/Intellisense) are defined in snippets.json
- Symbol parsing rules (for OUTLINE view and syntax check) are defined in in server/src/parser.ts
- In Proclaim v3.4+, the definition of the built-in syntax highlighter (CodeJock Syntax Edit) is stored in ConfigEditor/Schemas/_Proclaim.schclass
- To see how the extension has parsed a specific line/keywork, go View-->Command Palette.. Developer: Inspect TM Scopes
- For contributing/making changes to the extension, instead of 'installing' the script into your extensions directory try running the extension in the VSCode Extension Development Host
- copy/clone into %userprofile/proclaimscript
- open /server/src/server.ts in VSCode
- hit F5 to open the Extension Development Host, selecting 'client+server'
This will spawn the Language server client, launch the server and connect to it for debugging
- open the examples/test.pro file to test out syntax highlighting.
- make changes to the extension in the main VSCode window, reloading to see the effect on the extension
Framework inspired by https://github.com/chriscamicas/vscode-abl
GNU GPL v3.0
See LICENSE file for full details