VSCode 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.
This extension is a very early release. It may break your code. Use at your own risk.
Install from the VS Code Marketplace: prettier-lpc-vscode
This plugin, like Prettier, is
opinionated. The plugin honors standard prettier config options which
can be set via a .prettierrc
file. In particular, the following
options may be of interest to LPC developers:
API Option | Default | Description |
---|---|---|
printWidth |
Same option as in Prettier | |
tabWidth |
Same option as in Prettier | |
useTabs |
Same option as in Prettier |
For 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
The folowing languages features are not supported yet:
- Lambda parsing works, but is untested. Use extra caution.
- Union types
- Coroutines
- Support for remaining language features/syntax
- Split AST parsing into separate package
- Split prettier plugin portion into separate package
- Add more options for customization
- Add unit tests