Thanks to visit codestin.com
Credit goes to github.com

Skip to content

simochee/prettier-plugin-scala

Repository files navigation

prettier-plugin-scala

A monorepo for Prettier Scala formatting tools

CI Status Dependency Graph Security License: MIT

📦 Packages

This monorepo contains:

Package Description Version
@simochee/prettier-plugin-scala Prettier plugin for formatting Scala code npm
@simochee/scala-parser Scala parser built with Chevrotain npm

🚀 Quick Start

Using the Prettier Plugin

npm install --save-dev prettier @simochee/prettier-plugin-scala

Then format your Scala files:

npx prettier --write "**/*.scala"

See the plugin documentation for detailed usage.

Using the Parser

npm install @simochee/scala-parser
import { parse } from '@simochee/scala-parser';

const cst = parse('class Foo { def bar = 42 }');

See the parser documentation for API details.

🛠️ Development

This project uses:

Setup

# Clone the repository
git clone https://github.com/simochee/prettier-plugin-scala
cd prettier-plugin-scala

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run tests
pnpm test

Project Structure

prettier-plugin-scala/
├── packages/
│   ├── prettier-plugin-scala/  # Main Prettier plugin
│   └── scala-parser/          # Chevrotain-based parser
├── test-fixtures/             # Test samples and examples
├── docs/                      # Documentation
└── turbo.json                # Turborepo configuration

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for your changes
  4. Ensure all tests pass
  5. Submit a pull request

See CLAUDE.md for detailed development guidelines.

📄 License

MIT © simochee

🔗 Links

About

Prettier plugin for Scala code formatting with full Scala 2 & 3 support, built on Chevrotain parser

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors 2

  •  
  •