From 496c209ae55a3b7711b157aa846d1869bae42b2d Mon Sep 17 00:00:00 2001 From: Delta-official Date: Sun, 18 Jun 2023 21:24:16 +0000 Subject: Fix Rust lifetime highlighting (#213) * Fix lifetime highlighting * Update language_rust.lua * bump commit version and further improve upon lifetime highlighting --- manifest.json | 2 +- plugins/language_rust.lua | 2 +- 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" }, -- cgit v1.2.3