Skip to content

Commit

Permalink
Merge branch 'zed-industries:main' into hide-root
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelk90 authored Feb 21, 2025
2 parents 20859ae + 144d8a1 commit d9da335
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 15 deletions.
2 changes: 2 additions & 0 deletions crates/gpui/src/platform/windows/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ fn parse_syskeydown_msg_keystroke(wparam: WPARAM) -> Option<Keystroke> {
VK_ESCAPE => "escape",
VK_INSERT => "insert",
VK_DELETE => "delete",
VK_APPS => "menu",
_ => {
let basic_key = basic_vkcode_to_string(vk_code, modifiers);
if basic_key.is_some() {
Expand Down Expand Up @@ -1303,6 +1304,7 @@ fn parse_keydown_msg_keystroke(wparam: WPARAM) -> Option<KeystrokeOrModifier> {
VK_ESCAPE => "escape",
VK_INSERT => "insert",
VK_DELETE => "delete",
VK_APPS => "menu",
_ => {
if is_modifier(VIRTUAL_KEY(vk_code)) {
return Some(KeystrokeOrModifier::Modifier(modifiers));
Expand Down
52 changes: 47 additions & 5 deletions crates/languages/src/bash/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
(heredoc_body)
(heredoc_start)
(ansi_c_string)
(word)
] @string

(command_name) @function

(variable_name) @property
(variable_name) @variable

[
"case"
Expand All @@ -35,24 +34,67 @@
(comment) @comment

(function_definition name: (word) @function)
(command_name (word) @function)

[
(file_descriptor)
(number)
] @number

(file_descriptor) @number
(regex) @string.regex

[
(command_substitution)
(process_substitution)
(expansion)
]@embedded
] @embedded


[
"$"
"&&"
">"
">>"
">&"
">&-"
"<"
"|"
":"
"//"
"/"
"%"
"%%"
"#"
"##"
"="
"=="
] @operator

(test_operator) @keyword.operator

[
";"
] @punctuation.delimiter

[
"("
")"
"{"
"}"
"["
"]"
] @punctuation.bracket

(simple_expansion
"$" @punctuation.special)
(expansion
"${" @punctuation.special
"}" @punctuation.special) @embedded

(command_substitution
"$(" @punctuation.special
")" @punctuation.special)

(
(command (_) @constant)
(#match? @constant "^-")
Expand Down
5 changes: 3 additions & 2 deletions crates/languages/src/c/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@
[
(true)
(false)
(null)
] @constant
] @boolean

(null) @constant.builtin

(identifier) @variable

Expand Down
5 changes: 4 additions & 1 deletion crates/languages/src/cpp/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,12 @@ type :(primitive_type) @type.primitive
[
(true)
(false)
] @boolean

[
(null)
("nullptr")
] @constant
] @constant.builtin

(number_literal) @number

Expand Down
13 changes: 13 additions & 0 deletions crates/languages/src/go/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

(type_identifier) @type
(field_identifier) @variable.member
(package_identifier) @namespace

(keyed_element
.
Expand All @@ -20,6 +21,15 @@

(method_declaration
name: (field_identifier) @function.method)
(method_elem
name: (field_identifier) @function.method)

[
";"
"."
","
":"
] @punctuation.delimiter

[
"("
Expand Down Expand Up @@ -118,6 +128,9 @@
[
(true)
(false)
] @boolean

[
(nil)
(iota)
] @constant.builtin
Expand Down
10 changes: 8 additions & 2 deletions crates/languages/src/json/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
[
(true)
(false)
(null)
] @constant
] @boolean

(null) @constant.builtin

[
","
":"
] @punctuation.delimiter

[
"{"
Expand Down
10 changes: 8 additions & 2 deletions crates/languages/src/jsonc/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@
[
(true)
(false)
(null)
] @constant
] @boolean

(null) @constant.builtin

[
","
":"
] @punctuation.delimiter

[
"{"
Expand Down
5 changes: 4 additions & 1 deletion crates/languages/src/python/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@
; Literals

[
(none)
(true)
(false)
] @boolean

[
(none)
(ellipsis)
] @constant.builtin

Expand Down
3 changes: 2 additions & 1 deletion crates/languages/src/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"mod"
"move"
"pub"
"raw"
"ref"
"return"
"static"
Expand Down Expand Up @@ -129,7 +130,7 @@
(float_literal)
] @number

(boolean_literal) @constant
(boolean_literal) @boolean

[
(line_comment)
Expand Down
2 changes: 1 addition & 1 deletion crates/lsp/src/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ impl LanguageServer {
}),
},
trace: None,
workspace_folders: None,
workspace_folders: Some(vec![]),
client_info: release_channel::ReleaseChannel::try_global(cx).map(|release_channel| {
ClientInfo {
name: release_channel.display_name().to_string(),
Expand Down

0 comments on commit d9da335

Please sign in to comment.