aboutsummaryrefslogtreecommitdiff
path: root/plugins/language_tex.lua
diff options
context:
space:
mode:
author636f6d6d656e740a <39064859+636f6d6d656e740a@users.noreply.github.com>2020-05-26 22:00:06 +0100
committerGitHub <noreply@github.com>2020-05-26 22:00:06 +0100
commit4523d8160a958f984823b91a572b8aec4ae33d88 (patch)
tree0460ad04700f7b3016efb55d361dbe7b12c15789 /plugins/language_tex.lua
parentb80e49cb2c606f434b77ef2a0cd1f0a85db42f52 (diff)
downloadlite-xl-plugins-4523d8160a958f984823b91a572b8aec4ae33d88.tar.gz
lite-xl-plugins-4523d8160a958f984823b91a572b8aec4ae33d88.zip
Create language_tex.lua
Diffstat (limited to 'plugins/language_tex.lua')
-rw-r--r--plugins/language_tex.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/plugins/language_tex.lua b/plugins/language_tex.lua
new file mode 100644
index 0000000..eced489
--- /dev/null
+++ b/plugins/language_tex.lua
@@ -0,0 +1,16 @@
+local syntax = require "core.syntax"
+
+syntax.add {
+ files = { "%.tex$" },
+ comment = "%%",
+ patterns = {
+ { pattern = {"%%", "\n"}, type = "comment" },
+ { pattern = "&", type = "operator" },
+ { pattern = "\\\\", type = "operator" },
+ { pattern = {"%$", "%$"}, type = "operator" },
+ { pattern = {"\\%[", "\\]"}, type = "operator" },
+ { pattern = {"{", "}"}, type = "keyword" },
+ { pattern = "\\%w*", type = "keyword2" },
+ },
+ symbols = {}
+}