prettier-lpc-vscodeVSCode extension to format LPC (Lars Pensjö C) files with Prettier. It is written mainly for the LDMud flavor of LPC, but includes support for most FluffOS syntax as well. WARNINGThis extension should still be considered an early release. It may break your code. Use at your own risk. ChangelogSee CHANGELOG.md. InstallationInstall from the VS Code Marketplace: prettier-lpc-vscode ConfigurationThis plugin, like Prettier, is
opinionated. The plugin honors standard prettier config options which
can be set via a
Multi-Line ObjectsFor arrays and functions, this plugin follow's prettier's multi-line objects rule. For tips on how to control whether objects are collapsed to a single line, or not, see: https://prettier.io/docs/en/rationale.html#multi-line-objects Pair ArraysIn LDMud flavors of LPC there are often arrays that are treated as pairs. A common example of this is
By default, this plugin is set to identify a list of common variable names for which arrays should be formatted in pair mode as shown above. This list can be customized (or set to an empty array to completely disable this feature) by using the An array can also be forced into pair mode by utilizing the
If you love this extension, you couldKnown LimitationsThe folowing languages features are not supported yet:
To-Do
Other useful LPC toolsAlso check out the LPC Language Services extension. |