diff --git a/assets/js/editor/elixir/monarch_language.js b/assets/js/editor/elixir/monarch_language.js index 3802f96ea..e9ce04a17 100644 --- a/assets/js/editor/elixir/monarch_language.js +++ b/assets/js/editor/elixir/monarch_language.js @@ -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",