mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
fix highlights, indents, and tab size for yaml
This commit is contained in:
parent
de0b136be2
commit
fe25994fb3
5 changed files with 34 additions and 16 deletions
|
@ -221,6 +221,9 @@
|
|||
},
|
||||
"TSX": {
|
||||
"tab_size": 2
|
||||
},
|
||||
"Yaml": {
|
||||
"tab_size": 2
|
||||
}
|
||||
},
|
||||
// LSP Specific settings.
|
||||
|
|
|
@ -11,7 +11,7 @@ brackets = [
|
|||
]
|
||||
|
||||
auto_indent_using_last_non_empty_line = false
|
||||
increase_indent_pattern = ":$"
|
||||
increase_indent_pattern = ":\\s*$"
|
||||
decrease_indent_pattern = "^\\s*(else|elif|except|finally)\\b.*:"
|
||||
|
||||
[overrides.comment]
|
||||
|
|
|
@ -3,13 +3,15 @@ path_suffixes = ["yml", "yaml"]
|
|||
line_comment = "# "
|
||||
autoclose_before = ",]}"
|
||||
brackets = [
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "\"", end = "\"", close = true, newline = false },
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "\"", end = "\"", close = true, newline = false },
|
||||
]
|
||||
|
||||
increase_indent_pattern = ":\\s*[|>]?\\s*$"
|
||||
|
||||
[overrides.string]
|
||||
brackets = [
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
{ start = "{", end = "}", close = true, newline = true },
|
||||
{ start = "[", end = "]", close = true, newline = true },
|
||||
]
|
||||
|
|
|
@ -1,17 +1,29 @@
|
|||
(boolean_scalar) @boolean
|
||||
(null_scalar) @constant.builtin
|
||||
(double_quote_scalar) @string
|
||||
(single_quote_scalar) @string
|
||||
((block_scalar) @string (#set! "priority" 99))
|
||||
(string_scalar) @string
|
||||
|
||||
[
|
||||
(double_quote_scalar)
|
||||
(single_quote_scalar)
|
||||
(block_scalar)
|
||||
(string_scalar)
|
||||
] @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
(integer_scalar) @number
|
||||
(float_scalar) @number
|
||||
|
||||
[
|
||||
(integer_scalar)
|
||||
(float_scalar)
|
||||
] @number
|
||||
|
||||
(comment) @comment
|
||||
(anchor_name) @type
|
||||
(alias_name) @type
|
||||
(tag) @type
|
||||
(ERROR) @error
|
||||
|
||||
[
|
||||
(anchor_name)
|
||||
(alias_name)
|
||||
(tag)
|
||||
] @type
|
||||
|
||||
key: (flow_node (plain_scalar (string_scalar) @property))
|
||||
|
||||
[
|
||||
","
|
||||
|
|
1
crates/zed/src/languages/yaml/outline.scm
Normal file
1
crates/zed/src/languages/yaml/outline.scm
Normal file
|
@ -0,0 +1 @@
|
|||
(block_mapping_pair key: (flow_node (plain_scalar (string_scalar) @name))) @item
|
Loading…
Reference in a new issue