ZIm/crates/language/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
..
syntax_map Add a setting for custom associations between languages and files (#9290) 2024-03-13 10:23:30 -07:00
buffer.rs Fix panic when deleting just-generated text (#10282) 2024-04-08 17:59:25 +02:00
buffer_tests.rs Introduce InlineCompletionProvider (#9777) 2024-03-26 13:28:06 +01:00
diagnostic_set.rs Send along diagnostics when requesting code actions (#10281) 2024-04-08 17:54:06 +02:00
highlight_map.rs Docs for indent_size_for_line and co 2024-01-09 20:50:34 +01:00
language.rs Add the ability for extensions to provide language settings (#10296) 2024-04-08 19:17:12 -04:00
language_registry.rs Add the ability for extensions to provide language settings (#10296) 2024-04-08 19:17:12 -04:00
language_settings.rs Add the ability for extensions to provide language settings (#10296) 2024-04-08 19:17:12 -04:00
markdown.rs Support rendering strikethrough text in markdown (#8287) 2024-02-26 21:04:48 +02:00
outline.rs Enable clippy::useless_conversion (#8724) 2024-03-02 16:31:47 -05:00
proto.rs Refactor LSP adapter methods to compute labels in batches (#10097) 2024-04-03 09:22:56 -07:00
syntax_map.rs Enable clippy::iter_overeager_cloned (#8839) 2024-03-04 12:22:11 -05:00
task_context.rs Limit the extension tasks in the modal to current language only (#10207) 2024-04-06 00:18:32 +03:00