Skip to content

Commit

Permalink
rust: Highlight function signatures as functions (#4073)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
the-mikedavis authored Oct 3, 2022
1 parent 576c34f commit 4a3b776
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/queries/rust/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,9 @@
(function_item
name: (identifier) @function)

(function_signature_item
name: (identifier) @function)

; ---
; Macros
; ---
Expand Down

0 comments on commit 4a3b776

Please sign in to comment.