zed/crates/extension/src
Marshall Bowers 7c5bc3c26f
Add the ability for extensions to provide language settings (#10296)
This PR adds the ability for extensions to provide certain language
settings via the language `config.toml`.

These settings are then merged in with the rest of the settings when the
language is loaded from the extension.

The language settings that are available are:

- `tab_size`
- `hard_tabs`
- `soft_wrap`

Additionally, for bundled languages we moved these settings out of the
`settings/default.json` and into their respective `config.toml`s .

For languages currently provided by extensions, we are leaving the
values in the `settings/default.json` temporarily until all released
versions of Zed are able to load these settings from the extension.

---

Along the way we ended up refactoring the `Settings::load` method
slightly, introducing a new `SettingsSources` struct to better convey
where the settings are being loaded from.

This makes it easier to load settings from specific locations/sets of
locations in an explicit way.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2024-04-08 19:17:12 -04:00
..
wasm_host Remove duplicated code for unchanged parts of different extension API versions (#10218) 2024-04-08 10:16:12 -04:00
extension_builder.rs Add support for building a Tree-sitter grammar at a given path (#9965) 2024-03-29 14:30:10 -04:00
extension_lsp_adapter.rs Add language_server_workspace_configuration to extension API (#10212) 2024-04-05 17:04:07 -04:00
extension_manifest.rs Add support for using a language server with multiple languages (#10293) 2024-04-08 14:24:56 -04:00
extension_settings.rs Add the ability for extensions to provide language settings (#10296) 2024-04-08 19:17:12 -04:00
extension_store.rs Add support for using a language server with multiple languages (#10293) 2024-04-08 14:24:56 -04:00
extension_store_test.rs Add label_for_completion to extension API (#10175) 2024-04-04 13:56:04 -04:00
wasm_host.rs Add language_server_workspace_configuration to extension API (#10212) 2024-04-05 17:04:07 -04:00