# language: Refactor \`available_languages\` into its own struct \(\#61388\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e49d280094537b603953bfb76fac4756619b8181

Requested commit: e49d280094537b603953bfb76fac4756619b8181

Commit: e49d280094537b603953bfb76fac4756619b8181

Tree: 7620a111da485ab21b815fb9e953949d40c9a8a5

Author: Finn Evers

Committer: GitHub

## Message

```
language: Refactor `available_languages` into its own struct (#61388)

This adds a dedicated `AvailableLanguages` struct in preparation for a
more cabable language matching based on a given language config. No
functional changes, just shuffling some code around for this round.

Also made the LanguageMatcher non-cloneable in favor of wrapping it in
an Arc, since cloning is rather expensive for this and having a
reference is sufficient in all cases right now.

Release Notes:

- N/A

---------

Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
```

## Parents

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

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