# Improve extension suggestions \(\#9941\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c4bc1728508dce0641ac71593824d492705cda05)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c4bc1728508dce0641ac71593824d492705cda05

Requested commit: c4bc1728508dce0641ac71593824d492705cda05

Commit: c4bc1728508dce0641ac71593824d492705cda05

Tree: 151fdbc618e15625319a2950f7e164c2eba34b41

Author: Marshall Bowers

Committer: GitHub

## Message

```
Improve extension suggestions (#9941)

This PR improves the behavior for suggesting extensions.

Previously if the file had an extension, it would only look for
suggestions based on that extension. This prevented us from making
suggestions for files like `Cargo.lock`.

Suggestions are now made in the following order:

1. Check for any suggestions based on the entire file name
2. Check for any suggestions based on the file extension (if present)

This PR also fixes a bug where file name-based suggestions were looking
at the entire path, not just the file name.

Finally, the suggestion notification has been updated to include the ID
of the extension, to make it clearer which extension will be installed.

Release Notes:

- Improved extension suggestions.
```

## Parents

- [d074586fbff00da025f05bcff83073a7716cbac2](https://git.cafe/gitcafe/zed/commit/d074586fbff00da025f05bcff83073a7716cbac2?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c4bc1728508dce0641ac71593824d492705cda05?format=markdown)
