Add defn to monarch_language.js (#15)

* Add defn

* Update monarch_language.js

* Update monarch_language.js
This commit is contained in:
Wojtek Mach 2021-01-26 13:52:28 +01:00 committed by GitHub
parent 479b0379d8
commit ca36e22af0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,8 @@ const ElixirMonarchLanguage = {
declarationKeywords: [
"def",
"defp",
"defn",
"defnp",
"defguard",
"defguardp",
"defmacro",
@ -174,7 +176,7 @@ const ElixirMonarchLanguage = {
// Note: given `def a + b, do: nil`, `a` is not a function name,
// so we use negative look-ahead to ensure there's no operator.
[
/\b(defp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,
/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,
[
"keyword.declaration",
"white",