From 4ae2b452e9bd67ff618e3bb0e3488e49c98465e9 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 3 May 2024 22:06:54 +0200 Subject: [PATCH] fix(inko): highlighting of numeric call names (#6566) Inko allows for syntax such as `some_value.42.to_string`, where `42` is a method name. Similar to other languages that allow this (e.g. Rust), these numeric names should be highlighted as numbers instead of identifiers. To fix this, the query to highlight call names is adjusted to only highlight "name" and "constant" nodes as the function group, ensuring the remaining possible node ("integer") continues to use the same group as regular numbers. --- queries/inko/highlights.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/queries/inko/highlights.scm b/queries/inko/highlights.scm index c19eb3a3a..eff00fc02 100644 --- a/queries/inko/highlights.scm +++ b/queries/inko/highlights.scm @@ -190,6 +190,9 @@ name: _ @variable.parameter) (call - name: _ @function) + name: [ + (name) + (constant) + ] @function) (field) @variable.member