Giter VIP home page Giter VIP logo

forcedotcom / lightning-language-server Goto Github PK

View Code? Open in Web Editor NEW
30.0 17.0 48.0 9.57 MB

LWC and Aura Language Servers - shipped as part of the Salesforce VSCode Extensions

Home Page: https://forcedotcom.github.io/salesforcedx-vscode/

License: BSD 3-Clause "New" or "Revised" License

JavaScript 81.41% TypeScript 14.44% Shell 0.01% Makefile 0.01% CSS 0.15% HTML 3.04% Emacs Lisp 0.95%
aura lwc vscode language-server

lightning-language-server's Introduction

License
npm (scoped) npm (scoped) npm (scoped) Commitizen friendly

Lightning Language Servers

Mono repo for the LWC and Aura Language Services that are used in the Salesforce Extensions for VS Code.

Issues & Features

Open issues and feature requests on the Salesforce VSCode Extensions Repository.

Setup Development Environment

Pre-requisites

Follow the pre-requisites here: https://github.com/forcedotcom/salesforcedx-vscode/blob/develop/CONTRIBUTING.md

Clone this repository and Salesforce VSCode Extensions

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

Setup lightning-language-server repository

cd lightning-language-server
yarn install
yarn link-lsp

Setup Salesforce VSCode Extensions repository

cd ../salesforcedx-vscode
npm install
npm run link-lsp
npm run compile

Open both repositories in a vscode workspace

Note: complete the install process before this step, or you may receive errors about "Property ‘objType’ does not exist on type ‘Node’." from the Tern Server. This is due to the node_modules being improperly installed at a level above the lightning-language-server. If this does happen to you, simply remove the extra node_modules directory.

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:

Debugging with VSCode

Run 'Launch DX - Aura & LWC' from the VSCode debug view (its the last one in that long list).

Recompile on change

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.

Publishing to NPM

When a commit is merged to main, we will automatically create the github release, and then publish the changes to npm using our Github Actions

On-Demand publish to NPM

Navigate to the Actions tab in the repository

  1. Under Workflows on the left side, select Manual Release.
  2. Select Run Workflow, and ensure the newest version is published to npm once the workflow completes.
  3. Any failures will notify the pdt release channel internally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.