aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDelta-official <darkussdelta@gmail.com>2023-06-18 21:24:16 +0000
committerGitHub <noreply@github.com>2023-06-18 17:24:16 -0400
commit496c209ae55a3b7711b157aa846d1869bae42b2d (patch)
tree87228373cc1f659a9cb3de590e7788ce94407733
parent50140eb7bbfe6eecc882e72aed0970bd639f02ca (diff)
downloadlite-xl-plugins-496c209ae55a3b7711b157aa846d1869bae42b2d.tar.gz
lite-xl-plugins-496c209ae55a3b7711b157aa846d1869bae42b2d.zip
Fix Rust lifetime highlighting (#213)
* Fix lifetime highlighting * Update language_rust.lua * bump commit version and further improve upon lifetime highlighting
-rw-r--r--manifest.json2
-rw-r--r--plugins/language_rust.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/manifest.json b/manifest.json
index 8ac0784..9fcbb8d 100644
--- a/manifest.json
+++ b/manifest.json
@@ -812,7 +812,7 @@
},
{
"description": "Syntax for the [Rust](https://rust-lang.org/) programming language",
- "version": "0.1",
+ "version": "0.2",
"path": "plugins/language_rust.lua",
"id": "language_rust",
"mod_version": "3"
diff --git a/plugins/language_rust.lua b/plugins/language_rust.lua
index fa5479d..44bc342 100644
--- a/plugins/language_rust.lua
+++ b/plugins/language_rust.lua
@@ -11,7 +11,7 @@ syntax.add {
{ pattern = { 'r#"', '"#', '\\' }, type = "string" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = "'.'", type = "string" },
- { pattern = "'%a", type = "keyword2" },
+ { pattern = "'[%a_][%a%d_]*", type = "keyword2" },
{ pattern = "0[oO_][0-7]+", type = "number" },
{ pattern = "-?0x[%x_]+", type = "number" },
{ pattern = "-?%d+_%d", type = "number" },