fix highlights, indents, and tab size for yaml

This commit is contained in:
Kay Simmons 2023-02-07 14:20:23 -08:00
parent de0b136be2
commit fe25994fb3
5 changed files with 34 additions and 16 deletions

View file

@ -221,6 +221,9 @@
},
"TSX": {
"tab_size": 2
},
"Yaml": {
"tab_size": 2
}
},
// LSP Specific settings.

View file

@ -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]

View file

@ -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 },
]

View file

@ -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))
[
","

View file

@ -0,0 +1 @@
(block_mapping_pair key: (flow_node (plain_scalar (string_scalar) @name))) @item