Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add working "get started" example #4855

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ title: Installation

You can use Scalafmt from your editor, build tool or terminal.

Create a configuration file called `.scalafmt.conf` at the root of your
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace this section with a simple

## Configuration

head and below it a link to the configuration page, possibly with a short note stressing importance of this step.

project. As a minimum it should include the Scalafmt version and the
dialect of Scala you are formatting:

```
version = @STABLE_VERSION@
runner.dialect = scala3
Comment on lines +13 to +14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. move this to the very first example in the configuration page
  2. mark each of these two lines there with a # mandatory comment
  3. use scala213; if we are talking about complete newbies, using scala3 for 2.13 is likely to lead to very unhappy outcomes.

```

For help choosing a dialect refer to the
[documentation for configuration dialects](configuration.md#scala-dialects),
but common choices are `scala3` and `scala213`.

[The Configuration documentation](configuration.md) includes detailed
documentation on the options available in this file.

## IntelliJ

The _Scala_ plugin compatible with recent versions of IntelliJ IDEA has
Expand Down