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 preliminary support for FluffOS as well. WARNINGThis extension is a very early release. It may break your code. Use at your own risk. 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
Known LimitationsThe folowing languages features are not supported yet:
To-Do
|