DEV Community

loading...

Discussion on: P42 for Visual Studio Code

lgrammel profile image
Lars Grammel Author

Awesome, let me know how it goes :)

Thread Thread
lgrammel profile image
Lars Grammel Author • Edited

@nombrekeff I've released a new version, which supports some basic configuration through a "p42.toml" file in the workspace root.

To disable a refactoring, add a section with "refactoring.$refactoring-id" and set enabled to false, for example:

[refactoring.optional-chaining]
enabled = false
Enter fullscreen mode Exit fullscreen mode

The refactoring ids are displayed as grayed-out text in parentheses in the hover messages.

Thread Thread
nombrekeff profile image
Keff

Wow nice, such fast implementation, kudos to you!

I haven't been able to try it yet, but will do soon

Thread Thread
lgrammel profile image
Lars Grammel Author

It took a while longer, but excluding individual statements from the P42 analysis is now also possible with '// p42:ignore-next-statement'.

This small addition is super helpful beyond the VS Code plugin, in excluding unwanted suggestions in automated P42 pull request and commit reviews :)