diff options
| author | Adam Harrison <adamdharrison@gmail.com> | 2021-11-23 15:57:22 -0500 |
|---|---|---|
| committer | Adam Harrison <adamdharrison@gmail.com> | 2021-11-23 15:57:22 -0500 |
| commit | 96db380c73bf4d49d74e9740c6776e966b7a99a4 (patch) | |
| tree | 1b88b9bddad3158c16579688c3f6dc3145d720de /data/plugins/language_python.lua | |
| parent | 955acf53a3d9aed24b0b9d54356accc3438b92d4 (diff) | |
| parent | 43a6e21135bbb93473ed215d952dc4e6018d0080 (diff) | |
| download | lite-xl-96db380c73bf4d49d74e9740c6776e966b7a99a4.tar.gz lite-xl-96db380c73bf4d49d74e9740c6776e966b7a99a4.zip | |
Manual merge of into .
Diffstat (limited to 'data/plugins/language_python.lua')
| -rw-r--r-- | data/plugins/language_python.lua | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/data/plugins/language_python.lua b/data/plugins/language_python.lua index 252a0d14..f1430fb1 100644 --- a/data/plugins/language_python.lua +++ b/data/plugins/language_python.lua @@ -2,20 +2,21 @@ local syntax = require "core.syntax" syntax.add { - files = { "%.py$", "%.pyw$", "%.rpy$" }, + name = "Python", + files = { "%.py$", "%.pyw$" }, headers = "^#!.*[ /]python", comment = "#", patterns = { - { pattern = { "#", "\n" }, type = "comment" }, - { pattern = { '[ruU]?"', '"', '\\' }, type = "string" }, - { pattern = { "[ruU]?'", "'", '\\' }, type = "string" }, - { pattern = { '"""', '"""' }, type = "string" }, - { pattern = "0x[%da-fA-F]+", type = "number" }, - { pattern = "-?%d+[%d%.eE]*", type = "number" }, - { pattern = "-?%.?%d+", type = "number" }, - { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, - { pattern = "[%a_][%w_]*%f[(]", type = "function" }, - { pattern = "[%a_][%w_]*", type = "symbol" }, + { pattern = { "#", "\n" }, type = "comment" }, + { pattern = { '[ruU]?"""', '"""'; '\\' }, type = "string" }, + { pattern = { '[ruU]?"', '"', '\\' }, type = "string" }, + { pattern = { "[ruU]?'", "'", '\\' }, type = "string" }, + { pattern = "0x[%da-fA-F]+", type = "number" }, + { pattern = "-?%d+[%d%.eE]*", type = "number" }, + { pattern = "-?%.?%d+", type = "number" }, + { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, + { pattern = "[%a_][%w_]*%f[(]", type = "function" }, + { pattern = "[%a_][%w_]*", type = "symbol" }, }, symbols = { ["class"] = "keyword", |
