diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-03 17:46:53 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-03 17:46:53 +0100 |
| commit | 9e918d06adfdd680f153784e85657e45e9675ec6 (patch) | |
| tree | 3f411c1cc7b2ed7855ca1433e6ad1f0a7ab1701c /src | |
| parent | fd7b629f674e8ac66394c6cb8f945446003e4486 (diff) | |
Fix function call highlighting
Diffstat (limited to 'src')
| -rw-r--r-- | src/ide/highlight.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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<Category> { 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); } |
