aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrxi <rxi@users.noreply.github.com>2020-06-02 20:14:22 +0100
committerGitHub <noreply@github.com>2020-06-02 20:14:22 +0100
commitb812a82c8ff186076cf570e242214cf714d64e64 (patch)
treef18789c9022ae8e36e779783d3fd0f0430ace391
parentf91b56acff49c6d8afbb3a4dabd4d86f4d240d68 (diff)
parent6adffb41f87bd012cf4f0a63b50029ef8893779a (diff)
downloadlite-xl-plugins-b812a82c8ff186076cf570e242214cf714d64e64.tar.gz
lite-xl-plugins-b812a82c8ff186076cf570e242214cf714d64e64.zip
Merge pull request #49 from pta2002/patch-1
Add basic makefile syntax highlighting
-rw-r--r--README.md1
-rw-r--r--plugins/language_make.lua17
2 files changed, 18 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4435d82..9c8a18d 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,7 @@ Plugin | Description
[`language_hlsl`](plugins/language_hlsl.lua?raw=1) | Syntax for the [HLSL](https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl) programming language
[`language_hs`](plugins/language_hs.lua?raw=1) | Syntax for the [Haskell](https://www.haskell.org/) programming language
[`language_jiyu`](plugins/language_jiyu.lua?raw=1) | Syntax for the [jiyu](https://github.com/machinamentum/jiyu) programming language
+[`language_make`](plugins/language_make.lua?raw=1) | Syntax for the Make build system language
[`language_odin`](plugins/language_odin.lua?raw=1) | Syntax for the [Odin](https://github.com/odin-lang/Odin) programming language
[`language_php`](plugins/language_php.lua?raw=1) | Syntax for the [PHP](https://php.net) programming language
[`language_psql`](plugins/language_psql.lua?raw=1) | Syntax for the postgresql database access language
diff --git a/plugins/language_make.lua b/plugins/language_make.lua
new file mode 100644
index 0000000..f586a05
--- /dev/null
+++ b/plugins/language_make.lua
@@ -0,0 +1,17 @@
+local syntax = require "core.syntax"
+
+syntax.add {
+ files = { "Makefile", "makefile", "%.mk$" },
+ comment = "#",
+ patterns = {
+ { pattern = "#.*\n", type = "comment" },
+ { pattern = [[\.]], type = "normal" },
+ { pattern = "$[@^<%%?+|*]", type = "keyword2" },
+ { pattern = "$%(.-%)", type = "variable" },
+ { pattern = "%f[%w_][%d%.]+%f[^%w_]", type = "number" },
+ { pattern = "%..*:", type = "keyword2" },
+ { pattern = ".*:", type = "function" },
+ },
+ symbols = {
+ },
+}