extensions
extensions copied to clipboard
Add Salesforce Apex extension
Provides syntax highlighting for the Salesforce "Apex" language
We require contributors to sign our Contributor License Agreement, and we don't have @brianevanmiller on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.
@cla-bot check
The cla-bot has been summoned, and re-checked this pull request!
@maxdeviant - I fixed the ID mismatch
It looks like there is an issue with the Tree-sitter grammar:
Error: failed to compile extension
Caused by:
0: failed to compile grammar 'apex'
1: failed to compile apex parser with clang: clang: error: no such file or directory: '/home/runner/work/extensions/extensions/extensions/apex/grammars/apex/src/parser.c'
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:[30](https://github.com/zed-industries/extensions/actions/runs/11219620923/job/31185983310?pr=1449#step:11:31)5:5) {
code: 1,
killed: false,
signal: null,
cmd: './zed-extension --scratch-dir ./scratch --source-dir extensions/apex --output-dir output'
}
It looks like the Apex Tree-sitter grammar keeps the grammar in a subdirectory: https://github.com/aheber/tree-sitter-sfapex/tree/943a3eb7f55733929ccafe06841087c3004cb4e0/apex
So you'll to specify that in the path under your grammar config in your extension.toml:
[grammars.apex]
repository = "https://github.com/aheber/tree-sitter-sfapex"
commit = "c99ad4b16d112fea91745e3f1b769754239fdaba"
path = "apex"
Thank you @maxdeviant, I added the path in this commit 👍🏻
Looks like there's a problem in one of the Tree-sitter queries:
[2024-10-08T16:17:21Z INFO zed_extension] loaded grammar apex
Error: Query error at 13:4. Invalid node type list_initializer
I'm going to go ahead and close because there hasn't been any activity in a while. Happy to review a subsequent PR if you pick this up again in the future. Thanks.