fix: highlight `floor` in `|> float.floor` as function in Gleam (#13813)

pull/12772/merge
Nik Revenco 2025-06-21 19:50:52 +01:00 committed by GitHub
parent 250af462cd
commit 171dfc60e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,7 @@
((function_call ((function_call
function: (identifier) @function) function: (identifier) @function)
(#is-not? local)) (#is-not? local))
; highlights `a` in `|> a` as function
((binary_expression ((binary_expression
operator: "|>" operator: "|>"
right: (identifier) @function) right: (identifier) @function)
@ -186,3 +187,10 @@
; affects e.g. `replace` in `string.replace("+", "-")` ; affects e.g. `replace` in `string.replace("+", "-")`
; without this, it would be highlighted as a field instead of function ; without this, it would be highlighted as a field instead of function
(function_call (field_access (label) @function)) (function_call (field_access (label) @function))
; highlights `floor` in `|> float.floor` as function
(binary_expression
left: (_) "|>"
right: (field_access
record: (identifier) "."
field: (label) @function))