From 4a3b776b78c68f21017b1900eafb7fefeadeefa8 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 3 Oct 2022 09:56:50 -0500 Subject: [PATCH] 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. --- runtime/queries/rust/highlights.scm | 3 +++ 1 file changed, 3 insertions(+) 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 ; ---