Skip to content
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
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,43 @@

A [Dart](https://dart.dev/) extension for [Zed](https://zed.dev).

## Recommended Configuration

To make the most of the Dart LSP in Zed, you can configure it to automatically organize imports and apply fixes on format.

### Settings (`settings.json`)

Add the following to your `settings.json` to enable productivity features like organizing imports on save:

```json
{
"languages": {
"Dart": {
"format_on_save": "on",
"code_actions_on_format": {
"source.organizeImports": true,
"source.fixAll": true
}
}
}
}
```

### Key Bindings (`keymap.json`)

You can bind specific LSP actions to keyboard shortcuts. For example, to manually trigger "Sort Members":

```json
[
{
"context": "Editor && mode == full && language == Dart",
"bindings": {
"ctrl-alt-s": ["editor:apply_code_action", "source.sortMembers"]
}
}
]
```

## Documentation

See:
Expand Down