mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-29 23:05:59 +08:00
Add defn to monarch_language.js (#15)
* Add defn * Update monarch_language.js * Update monarch_language.js
This commit is contained in:
parent
479b0379d8
commit
ca36e22af0
1 changed files with 3 additions and 1 deletions
|
|
@ -28,6 +28,8 @@ const ElixirMonarchLanguage = {
|
||||||
declarationKeywords: [
|
declarationKeywords: [
|
||||||
"def",
|
"def",
|
||||||
"defp",
|
"defp",
|
||||||
|
"defn",
|
||||||
|
"defnp",
|
||||||
"defguard",
|
"defguard",
|
||||||
"defguardp",
|
"defguardp",
|
||||||
"defmacro",
|
"defmacro",
|
||||||
|
|
@ -174,7 +176,7 @@ const ElixirMonarchLanguage = {
|
||||||
// Note: given `def a + b, do: nil`, `a` is not a function name,
|
// 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.
|
// 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",
|
"keyword.declaration",
|
||||||
"white",
|
"white",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue