zed/crates/editor/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
..
display_map Compute scrollbar markers asynchronously (#10080) 2024-04-03 12:21:17 +02:00
git Add git blame (#8889) 2024-03-28 18:32:11 +01:00
scroll editor: Preserve scroll position when jumping from multibuffer (#9921) 2024-03-28 18:33:57 +01:00
test Compute scrollbar markers asynchronously (#10080) 2024-04-03 12:21:17 +02:00
actions.rs Add git blame (#8889) 2024-03-28 18:32:11 +01:00
blink_manager.rs Remove 2 suffix for editor 2024-01-03 10:58:57 -08:00
debounced_delay.rs Add debounce for re-querying completion documentation 2024-01-31 09:50:26 -05:00
display_map.rs Fix panic in visual line mode with folds (#10284) 2024-04-08 11:39:06 -06:00
editor.rs Make scrollbar a bit wider (#10248) 2024-04-08 10:32:09 -07:00
editor_settings.rs Add the ability for extensions to provide language settings (#10296) 2024-04-08 19:17:12 -04:00
editor_tests.rs Fix crash when joining two consecutive lines (#10000) 2024-04-05 15:45:29 +02:00
element.rs Fix block cursor does not render italic for vim (#10249) 2024-04-08 14:50:50 -06:00
git.rs Add git blame (#8889) 2024-03-28 18:32:11 +01:00
highlight_matching_bracket.rs Compute scrollbar markers asynchronously (#10080) 2024-04-03 12:21:17 +02:00
hover_links.rs Revert PR #6924 - go to reference when there's only one (#10094) 2024-04-02 14:31:58 -07:00
hover_popover.rs Fix interpretation of \n in hovers (#10214) 2024-04-05 15:59:37 -07:00
inlay_hint_cache.rs Add a setting for custom associations between languages and files (#9290) 2024-03-13 10:23:30 -07:00
inline_completion_provider.rs Introduce InlineCompletionProvider (#9777) 2024-03-26 13:28:06 +01:00
items.rs Return back the ability to save non-dirty singleton buffers (#10174) 2024-04-04 18:06:47 +02:00
mouse_context_menu.rs Add git blame (#8889) 2024-03-28 18:32:11 +01:00
movement.rs Add surrounds support for vim (#9400) 2024-04-08 11:41:06 -06:00
persistence.rs
rust_analyzer_ext.rs Enable clippy::useless_conversion (#8767) 2024-03-03 10:22:55 -05:00
scroll.rs chore: Wrap WorkspaceId in newtype (#9492) 2024-03-18 12:39:03 +01:00
selections_collection.rs Enable clippy::clone_on_copy (#8728) 2024-03-02 17:37:48 -05:00
test.rs Fix flickering (#9012) 2024-03-11 10:45:57 +01:00