Skip to content

Commit

Permalink
rust: Highlight function signatures as functions (helix-editor#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 and pathwave committed Nov 4, 2022
1 parent 6422ba1 commit f1301fa
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 f1301fa

Please sign in to comment.