aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/rust
diff options
context:
space:
mode:
authorMichael Davis2022-10-03 14:56:50 +0000
committerGitHub2022-10-03 14:56:50 +0000
commit4a3b776b78c68f21017b1900eafb7fefeadeefa8 (patch)
tree20ddceb632a1fc87aa84ac756c363cc9d6fa4871 /runtime/queries/rust
parent576c34f84e87f8eb1787d0b6b0940b19e965483b (diff)
rust: Highlight function signatures as functions (#4073)
This stanza highlights functions within trait definitions. For example, in: pub trait Widget { fn render(self, area: Rect, buf: &mut Buffer); } `render` is currently highlighted as a variable. With this change it's highlighted as a function.
Diffstat (limited to 'runtime/queries/rust')
-rw-r--r--runtime/queries/rust/highlights.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/queries/rust/highlights.scm b/runtime/queries/rust/highlights.scm
index 7d0afcde..81f05f7a 100644
--- a/runtime/queries/rust/highlights.scm
+++ b/runtime/queries/rust/highlights.scm
@@ -253,6 +253,9 @@
(function_item
name: (identifier) @function)
+(function_signature_item
+ name: (identifier) @function)
+
; ---
; Macros
; ---