Skip to content

Commit 4a3b776

Browse files
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.
1 parent 576c34f commit 4a3b776

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

runtime/queries/rust/highlights.scm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,9 @@
253253
(function_item
254254
name: (identifier) @function)
255255

256+
(function_signature_item
257+
name: (identifier) @function)
258+
256259
; ---
257260
; Macros
258261
; ---

0 commit comments

Comments
 (0)