An ObjectScript extension for Zed to support development for the InterSystems IRIS product.
This Zed extension uses the tree-sitter-objectscript grammars and the objectscript-lsp crate (local to this repo) to provide syntax highlighting, code injections, and language support for .cls, .mac, .rtn, .inc, .int and .xml files containing ObjectScript. Install the following extensions below to get syntax highlighting for any code injected into objectscript that is sql, html, or special comments (TODO, NOTE, etc).
The current features supported in the ObjectScript language server are goto_definition, goto_implementation, refactor, and diagnostics. These features are described in detail in the objectscript-lsp/documentation/features folder.
If you want the most up-to-date version of this extension (including experimental parts that have not yet been merged into zed-industries/extensions, follow these steps:
- Make sure you have rust installed.
- Clone this repository into your local folders and cd into the objectscript-lsp folder (
cd zed-objectscript/objectscript-lsp). - Build a local copy of the binary:
cargo b && cargo install --path . --force - Go to Zed, and do
Cmd + Shift + P, and then choosezed:Extensions. Then chooseInstall Dev Extensionand point it at your local copy of this directory. - NOTE: If rebuilding, sometimes you have to quit out of Zed and re-enter it for the changes to show.
Right now we have a strict mode setting. If true, diagnostics will send warnings for any class or method not defined in the current workspace. Additionally, duplicate class names/ method names in the same class will be filed as a diagnostic. If false, only syntax errors will be filed in diagnostics.
The default is true. To set it to false, go to the Zed settings.json: (Cmd + Shift + P -> settings -> open settings.json) and add this:
"lsp": {
"objectscript-lsp": {
"initialization_options": {
"enableStrictMode": false
},
"settings": {
"enableStrictMode": false
}
}
},Please report issues via GitHub Issues.
Contributions are welcome. Please submit changes via Pull Requests. Our preference is to use Conventional Commits for commit messages in order to keep the summaries terse, but allowing for more detail on the subsequent lines of the commit message.
To develop this extension, see the Developing Extensions section of the Zed docs.
To enable log output for Zed, set RUST_LOG as follows before starting zed from the command line:
$env:RUST_LOG = "language,extension=trace"RUST_LOG = "language,extension=trace"Cloning and the building a debug Zed with these RUST_LOG settings gives fairly detailed log output including diagnosing
bad .scm rules.