diff options
author | jgmdev <jgmdev@gmail.com> | 2022-06-07 11:34:58 -0400 |
---|---|---|
committer | jgmdev <jgmdev@gmail.com> | 2022-06-07 11:34:58 -0400 |
commit | 26f595adf71540cd02243ebb41a520b01a752621 (patch) | |
tree | 8d3de71a8fd448d063aec10dc2341d4caede81e2 /plugins/language_powershell.lua | |
parent | 980c2643c0acbcdccef62248f31010c94cb08cc8 (diff) | |
download | lite-xl-plugins-26f595adf71540cd02243ebb41a520b01a752621.tar.gz lite-xl-plugins-26f595adf71540cd02243ebb41a520b01a752621.zip |
changed indentation to 2 spaces for consistency across the repo
Diffstat (limited to 'plugins/language_powershell.lua')
-rw-r--r-- | plugins/language_powershell.lua | 141 |
1 files changed, 72 insertions, 69 deletions
diff --git a/plugins/language_powershell.lua b/plugins/language_powershell.lua index 3350419..fdba844 100644 --- a/plugins/language_powershell.lua +++ b/plugins/language_powershell.lua @@ -2,73 +2,76 @@ local syntax = require "core.syntax" syntax.add { - name = "PowerShell", - files = {"%.ps1$", "%.psm1$", "%.psd1$", "%.ps1xml$", "%.pssc$", "%.psrc$", "%.cdxml$"}, - comment = "#", - patterns = { - {pattern = "#.*\n", type = "comment"}, - {pattern = [[\.]], type = "normal"}, - {pattern = {'"', '"'}, type = "string"}, - {pattern = {"'", "'"}, type = "string"}, - {pattern = "%f[%w_][%d%.]+%f[^%w_]", type = "number"}, - {pattern = "[%+=/%*%^%%<>!~|&,:]+", type = "operator"}, - {pattern = "%f[%S]%-[%w%-_]+", type = "function"}, - {pattern = "[%u][%a]+[%-][%u][%a]+", type = "function"}, - {pattern = "${.*}", type = "symbol"}, - {pattern = "$[%a_@*][%w_]*", type = "keyword2"}, - {pattern = "$[%$][%a]+", type = "keyword2"}, - {pattern = "[%a_][%w_]*", type = "symbol"} - }, - symbols = { - ["if"] = "keyword", - ["else"] = "keyword", - ["elseif"] = "keyword", - ["switch"] = "keyword", - ["default"] = "keyword", - ["function"] = "keyword", - ["filter"] = "keyword", - ["workflow"] = "keyword", - ["configuration"] = "keyword", - ["class"] = "keyword", - ["enum"] = "keyword", - ["Parameter"] = "keyword", - ["ValidateScript"] = "keyword", - ["CmdletBinding"] = "keyword", - ["try"] = "keyword", - ["catch"] = "keyword", - ["finally"] = "keyword", - ["throw"] = "keyword", - ["while"] = "keyword", - ["for"] = "keyword", - ["do"] = "keyword", - ["until"] = "keyword", - ["break"] = "keyword", - ["continue"] = "keyword", - ["foreach"] = "keyword", - ["in"] = "keyword", - ["return"] = "keyword", - ["where"] = "function", - ["select"] = "function", - ["filter"] = "keyword", - ["in"] = "keyword", - ["trap"] = "keyword", - ["param"] = "keyword", - ["data"] = "keyword", - ["dynamicparam"] = "keyword", - ["begin"] = "function", - ["process"] = "function", - ["end"] = "function", - ["exit"] = "function", - ["inlinescript"] = "function", - ["parallel"] = "function", - ["sequence"] = "function", - ["true"] = "literal", - ["false"] = "literal", - ["TODO"] = "comment", - ["FIXME"] = "comment", - ["XXX"] = "comment", - ["TBD"] = "comment", - ["HACK"] = "comment", - ["NOTE"] = "comment" - } + name = "PowerShell", + files = { + "%.ps1$", "%.psm1$", "%.psd1$", "%.ps1xml$", + "%.pssc$", "%.psrc$", "%.cdxml$" + }, + comment = "#", + patterns = { + {pattern = "#.*\n", type = "comment"}, + {pattern = [[\.]], type = "normal"}, + {pattern = {'"', '"'}, type = "string"}, + {pattern = {"'", "'"}, type = "string"}, + {pattern = "%f[%w_][%d%.]+%f[^%w_]", type = "number"}, + {pattern = "[%+=/%*%^%%<>!~|&,:]+", type = "operator"}, + {pattern = "%f[%S]%-[%w%-_]+", type = "function"}, + {pattern = "[%u][%a]+[%-][%u][%a]+", type = "function"}, + {pattern = "${.*}", type = "symbol"}, + {pattern = "$[%a_@*][%w_]*", type = "keyword2"}, + {pattern = "$[%$][%a]+", type = "keyword2"}, + {pattern = "[%a_][%w_]*", type = "symbol"} + }, + symbols = { + ["if"] = "keyword", + ["else"] = "keyword", + ["elseif"] = "keyword", + ["switch"] = "keyword", + ["default"] = "keyword", + ["function"] = "keyword", + ["filter"] = "keyword", + ["workflow"] = "keyword", + ["configuration"] = "keyword", + ["class"] = "keyword", + ["enum"] = "keyword", + ["Parameter"] = "keyword", + ["ValidateScript"] = "keyword", + ["CmdletBinding"] = "keyword", + ["try"] = "keyword", + ["catch"] = "keyword", + ["finally"] = "keyword", + ["throw"] = "keyword", + ["while"] = "keyword", + ["for"] = "keyword", + ["do"] = "keyword", + ["until"] = "keyword", + ["break"] = "keyword", + ["continue"] = "keyword", + ["foreach"] = "keyword", + ["in"] = "keyword", + ["return"] = "keyword", + ["where"] = "function", + ["select"] = "function", + ["filter"] = "keyword", + ["in"] = "keyword", + ["trap"] = "keyword", + ["param"] = "keyword", + ["data"] = "keyword", + ["dynamicparam"] = "keyword", + ["begin"] = "function", + ["process"] = "function", + ["end"] = "function", + ["exit"] = "function", + ["inlinescript"] = "function", + ["parallel"] = "function", + ["sequence"] = "function", + ["true"] = "literal", + ["false"] = "literal", + ["TODO"] = "comment", + ["FIXME"] = "comment", + ["XXX"] = "comment", + ["TBD"] = "comment", + ["HACK"] = "comment", + ["NOTE"] = "comment" + } } |