Mono repo for the LWC and Aura Language Services that are used in the Salesforce Extensions for VS Code.
Open issues and feature requests on the Salesforce VSCode Extensions Repository.
Follow the pre-requisites here: https://github.com/forcedotcom/salesforcedx-vscode/blob/develop/CONTRIBUTING.md
git clone [email protected]:forcedotcom/lightning-language-server.git
git clone [email protected]:forcedotcom/salesforcedx-vscode.git
Note: These projects need to be cloned into the same parent directory
cd lightning-language-server
yarn install
yarn link-lsp
cd ../salesforcedx-vscode
npm install
npm run link-lsp
npm run compile
cd lightning-language-server
code ./vscode-workspaces/multiroot-simple.code-workspace # or
code ./vscode-workspaces/multiroot-flat.code-workspace
The "simple" workspace will effectively show two main nodes in the Explorer, while "flat" will show each package separately.
Simple:
Flat:
Run 'Launch DX - Aura & LWC' from the VSCode debug view (its the last one in that long list).
cd ../lightning-language-server
yarn watch
cd ../salesforcedx-vscode
npm run watch
Note: You need to restart vscode each time you make changes to the language server or the lightning vscode extensions. Easiest way to do this is to kill the vscode client and hit F5 to relaunch your debugger.
Automated deploys to NPM will occur weekly on Sundays @midnight via CircleCI. https://circleci.com/gh/forcedotcom/lightning-language-server/tree/main
If you want to have CircleCI publish the current main branch to NPM, you can run the following script to trigger the deploy job to run:
curl -v -u ${CircleCIToken}: -X POST --header "Content-Type: application/json" -d '{
"branch": "main",
"parameters": {
"deploy": true,
"version": "patch"
}
}' https://circleci.com/api/v2/project/gh/forcedotcom/lightning-language-server/pipeline
You can also modify the version parameter in the curl script to configure how the version is bumped. Valid values are: [major | minor | patch | premajor | preminor | prepatch | prerelease]. By default the weekly builds only bump the patch version.
Note: You need to substitute in your own ${CircleCIToken} to make this script work. You can create a Personal API Token by following the instructions here: https://circleci.com/docs/2.0/managing-api-tokens/#creating-a-personal-api-token
yarn bump-versions
yarn publish-lsp
Note: you will have to be authenticated to an account that has access to the @salesforce org on NPM