Skip to content

Syntax: Switch support.function to variable.function #452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RustEnhanced.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ contexts:
push: after-operator

- match: '\b[[:lower:]_][[:lower:][:digit:]_]*(?=\()'
scope: support.function.rust
scope: variable.function.rust

- match: '{{identifier}}'

Expand Down
4 changes: 2 additions & 2 deletions tests/syntax-rust/syntax_test_control_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ while let BasicStruct(k) = j {
// <- meta.block punctuation.section.block.end

continue_running();
//^^^^^^^^^^^^^^ support.function
//^^^^^^^^^^^^^^ variable.function
break_things();
//^^^^^^^^^^ support.function
//^^^^^^^^^^ variable.function
2 changes: 1 addition & 1 deletion tests/syntax-rust/syntax_test_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let w = Message::WriteString("Some string".to_string());
// ^^^^^^^^^^^ storage.type.source
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group
// ^^^^^^^^^^^^^ string.quoted.double
// ^^^^^^^^^ support.function
// ^^^^^^^^^ variable.function
let m = Message::Move { x: 50, y: 200 };
// ^^^^^^^^^^^^^^^^^ meta.block
// ^^ constant.numeric.integer.decimal
Expand Down
4 changes: 2 additions & 2 deletions tests/syntax-rust/syntax_test_generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ fn collect_vec() {
// ^^ constant.numeric.integer.decimal
// ^ punctuation.section.group.end
// ^ punctuation.accessor.dot
// ^^^^^^^^^ support.function
// ^^^^^^^^^ variable.function
// ^^ punctuation.section.group
// ^ punctuation.accessor.dot
// ^^ punctuation.accessor
Expand Down Expand Up @@ -413,7 +413,7 @@ fn function<const N: u16>() {
// ^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function meta.block meta.generic
// ^ punctuation.definition.generic.begin
// ^^^^^^^^^^^^^^^^^^ meta.block
// ^^^ support.function
// ^^^ variable.function
// ^ meta.group punctuation.section.group.begin
// ^ keyword.operator.comparison
// ^ punctuation.section.group.end
Expand Down
2 changes: 1 addition & 1 deletion tests/syntax-rust/syntax_test_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ my_var = format!("Hello {name}, how are you?",
write!(get_writer(), "{}", "{}")
// ^^^^^^ support.macro
// ^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group
// ^^^^^^^^^^ support.function
// ^^^^^^^^^^ variable.function
// ^^^^ string.quoted.double
// ^^ constant.other.placeholder
// ^^^^ string.quoted.double
Expand Down
2 changes: 1 addition & 1 deletion tests/syntax-rust/syntax_test_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ match n {
// Binding
match my_func() {
// ^^ keyword.control
// ^^^^^^^ support.function
// ^^^^^^^ variable.function
// ^ meta.block punctuation.section.block.begin
0 => println!("None"),
// ^ constant.numeric.integer.decimal
Expand Down