![]() If you’d like to further customize Prettier, add other config options.Copy and paste the below content and paste them int the file.prettierrc, in the root of your project, by right clicking on the left Explorer pane, and selecting “New File”. Create a Prettier configuration file called.Install Prettier by running in the Terminal: npm install -save-dev -save-exact prettier prettier-plugin-apex.Note that this step should be done once per org.Or, press Ctrl + Shift + P, and choose “npm: Run Init” Go to the Terminal tab, and type “npm init”.Check the left Explorer pane to see if this file exists, or search for it usong Ctrl + P. First, you don’t already have a package.json in your project, run the command “npm Init”.Once VS Code is restarted, let’s install Prettier. Now, add the Node.JS Extension Pack extension to VS Code: Make sure that “Add to PATH” installation option is checked.In my ase, I got the Windows 64-bit MSI file. Depending on your OS, download the right package.If it is not installed yet, follow these steps: To begin, Node.JS should be installed on your computer. In this post, I will explain how I installed Prettier, and in the next post I will explain about Uncrustify. VS Code is becoming the most popular Salesforce IDE, but unfortunately, VS Code does not have a default code formatter for Apex! For that, we can use some extensins like Prettierand/or Uncrustify.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |