
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@salesforce/apex-tmlanguage
Advanced tools
Textmate grammar for Apex with outputs for VSCode, Atom and TextMate.
This repository contains the source code for generating the language grammar files for Salesforce's Apex.
Development and setup of this project has not been tested for Windows OS. You may see a node-gyp error - follow the instrutions here to resolve it.
To build and test install Node.js do the following:
yarn install to install any dependencies.yarn run build to build using gulp.yarn run test to run tests.Output grammars are output in the grammars/ directory.
To see the token changes from within the Salesforce VS Code Extensions:
apex.tmLanguage results into ../salesforcedx-vscode/packages/salesforcedx-vscode-apex/node_modules/@salesforce/apex-tmlanguage/grammars/apex.tmLanguage.Command Palette select Developer: Inspect Editor Tokens and Scopes.Token structure is based off of Textmate's Language Grammar guidelines
For the standalone SOQL grammar, tests are executed with vscode-tmgrammar-tests.
test/soql/
|-- simple_account.soql "Manually" created test cases
|-- ...
`-- snapshots/ "Snapshot-based" test cases
|-- example-*.soql
|-- example-*.soql.snap
`-- ...
The difference between manual vs. snapshot tests is that the latter are auto-generated and can be updated with command vscode-tmgrammar-snap -u. They are useful to quickly see the output of applying the grammar and catch regressions.
The example-* queries were taken from Example SELECT clauses.
grammars/apex.tmLanguage.cson - for Atomgrammars/apex.tmLanguage - TextMate grammar (XML plist)grammars/soql.tmLanguage - TextMate grammar (XML plist) for standalone SOQL filesMerges to main on this repo with commits of type 'feat' or 'fix' get automatically published as a GitHub release and an NPM package through Github Actions.
This repository was copied from https://github.com/dotnet/csharp-tmLanguage
FAQs
Textmate grammar for Apex with outputs for VSCode, Atom and TextMate.
The npm package @salesforce/apex-tmlanguage receives a total of 5,789 weekly downloads. As such, @salesforce/apex-tmlanguage popularity was classified as popular.
We found that @salesforce/apex-tmlanguage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 47 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.