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>
28 lines
1.1 KiB
TOML
28 lines
1.1 KiB
TOML
name = "TSX"
|
|
grammar = "tsx"
|
|
path_suffixes = ["tsx"]
|
|
line_comments = ["// "]
|
|
autoclose_before = ";:.,=}])>"
|
|
brackets = [
|
|
{ start = "{", end = "}", close = true, newline = true },
|
|
{ start = "[", end = "]", close = true, newline = true },
|
|
{ start = "(", end = ")", close = true, newline = true },
|
|
{ start = "<", end = ">", close = false, newline = true, not_in = ["string", "comment"] },
|
|
{ start = "\"", end = "\"", close = true, newline = false, not_in = ["string"] },
|
|
{ start = "'", end = "'", close = true, newline = false, not_in = ["string", "comment"] },
|
|
{ start = "`", end = "`", close = true, newline = false, not_in = ["string"] },
|
|
{ start = "/*", end = " */", close = true, newline = false, not_in = ["string", "comment"] },
|
|
]
|
|
word_characters = ["#", "$"]
|
|
scope_opt_in_language_servers = ["tailwindcss-language-server"]
|
|
prettier_parser_name = "typescript"
|
|
tab_size = 2
|
|
|
|
[overrides.element]
|
|
line_comments = { remove = true }
|
|
block_comment = ["{/* ", " */}"]
|
|
|
|
[overrides.string]
|
|
word_characters = ["-"]
|
|
opt_into_language_servers = ["tailwindcss-language-server"]
|