Skip to content

Commit

Permalink
add language_elm.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
maihd committed Aug 25, 2024
1 parent 8d61e62 commit de4ae49
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions data/plugins/language_elm.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
local syntax = require("core.syntax")

syntax.add {
name = "Elm",
files = "%.elm$",
comment = "--",
indent_size = 2,
patterns = {
{ pattern = { "\"", "\"", "\\" }, type = "string" },
{ pattern = "0x[%da-fA-F]+", type = "number" },
{ pattern = "-?%d+[%d%.eE]*", type = "number" },
{ pattern = "-?%.?%d+", type = "number" },
{ pattern = "%-%-.-\n", type = "comment" },
{ pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" },
-- { pattern = "[%a_][%w_]*%s+[=%f]", type = "function" },
{ pattern = "[%a_][%w_]*", type = "symbol" },
},
symbols = {
["module"] = "keyword",
["exposing"] = "keyword",
["import"] = "keyword",
["case"] = "keyword",
["type"] = "keyword",
["of"] = "keyword",
["as"] = "keyword",
["if"] = "keyword",
["then"] = "keyword",
["else"] = "keyword",
["alias"] = "keyword",
["let"] = "keyword",
["in"] = "keyword",

["True"] = "literal",
["False"] = "literal",
}
}

0 comments on commit de4ae49

Please sign in to comment.