What’s new in P42? Summer 2022 Summary

Lars Grammel
4 min readJun 21, 2022

--

Since February, the P42 JavaScript Assistant for Visual Studio Code has grown considerably and contains over 90 code assists and refactorings. The user interface has been improved based on feedback, and the JavaScript Assistant now supports Vue.js. Here are the details:

Vue.js Support (P42 Pro)

You can now use code assists, refactorings, and suggestions from the P42 JavaScript Assistant inside .vue files and mass refactorings updates .vue files.

User Interface

Keyboard Shortcuts

The JavaScript Assistant has different default keyboard shortcuts for the code assist context menus and a “move” context menu shortcut. You can now add custom keyboard shortcuts for any P42 code assist.

Suggestion Display and Panel

The P42 refactorings suggestions are shown as hints inside the editor (underline with three dots) by default, and the suggestion side panel highlights relevant code on mouseover. When you click on a selected item in the side panel, the editor scrolls to the appropriate location.

Mass Refactoring (P42 Pro)

The mass refactoring dialog is now more usable. You can search the description and details, e.g., to find all ES2015 modernizations, and the refactorings are sorted alphabetically.

The mass refactoring output is easier to understand and contains more information. It includes the file exclusions patterns, a progress indicator for every 50 analyzed files, and the overall refactoring time in seconds.

Configuration

ECMAScript Target Version

You can specify the target ECMAScript version in the P42 configuration file. Code modernizations that would require newer ECMAScript versions are hidden when you configure an older target version.

Hide Overlapping Code Actions

The P42 JavaScript Assistant provides code assists that mirror and extend the functionality of code assists that come with Visual Studio Code. You can now configure the visibility of overlapping code assists.

Code Assists and Refactorings

Working with Variables

Working with Destructuring Expressions

Working with Classes

Working with Functions

Working with Loops and Arrays

Working with Conditional Expressions

Working with String and Templates

Other Code Actions

You can follow @p42ai on Twitter to get notified about new features.

Happy Coding!

--

--