From 24a9eaeaa9cd47e8f60631ef91f343899a76f1e6 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 12 Oct 2021 16:11:14 -0500 Subject: [PATCH] highlight calls to erlang modules as types (#5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * highlight calls to erlang modules as types * Add test Co-authored-by: Jonatan KÅ‚osko --- queries/highlights.scm | 4 ++++ test/highlight/calls.ex | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/queries/highlights.scm b/queries/highlights.scm index bb88e45..fb4518d 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -64,6 +64,10 @@ (alias) @type +(call + target: (dot + left: (atom) @type)) + (char) @constant ; Quoted content diff --git a/test/highlight/calls.ex b/test/highlight/calls.ex index cc0a144..c4ff8d0 100644 --- a/test/highlight/calls.ex +++ b/test/highlight/calls.ex @@ -79,3 +79,12 @@ Enum.map([1, 2], fn x -> end) # <- keyword # ^ punctuation.bracket + +:erlang.abs(-1) +# ^ type +# ^ operator +# ^ function +# ^ punctuation.bracket +# ^ operator +# ^ number +# ^ punctuation.bracket