From 9e918d06adfdd680f153784e85657e45e9675ec6 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 3 Feb 2023 17:46:53 +0100 Subject: Fix function call highlighting --- src/ide/highlight.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ide/highlight.rs b/src/ide/highlight.rs index 0ce6bf8a..20aa6998 100644 --- a/src/ide/highlight.rs +++ b/src/ide/highlight.rs @@ -259,8 +259,10 @@ fn highlight_ident(node: &LinkedNode) -> Option { let next_leaf = node.next_leaf(); if let Some(next) = &next_leaf { if node.range().end == next.offset() - && matches!(next.kind(), SyntaxKind::LeftParen | SyntaxKind::LeftBracket) + && next.kind() == SyntaxKind::LeftParen && matches!(next.parent_kind(), Some(SyntaxKind::Args | SyntaxKind::Params)) + || (next.kind() == SyntaxKind::LeftBracket + && next.parent_kind() == Some(SyntaxKind::ContentBlock)) { return Some(Category::Function); } -- cgit v1.2.3