From e5ce2c06c3af2470aaed18981129503f1ad4d94c Mon Sep 17 00:00:00 2001 From: Ash-Coder-or-Not Date: Mon, 17 Jan 2022 01:54:11 +0530 Subject: adding gemtext highlighting plugin --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index e02f69c..7b459cc 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ to something other than a raw file it should be marked with an asterisk.* | [`language_gdscript`](plugins/language_gdscript.lua?raw=1) | Syntax for the [Godot Engine](https://godotengine.org/)'s GDScript scripting language | | [`language_glsl`](plugins/language_glsl.lua?raw=1) | Syntax for the [GLSL](https://www.khronos.org/registry/OpenGL/specs/gl/) programming language | | [`language_go`](plugins/language_go.lua?raw=1) | Syntax for the [Go](https://golang.org/) programming language | +| [`language_gmi`](plugins/language_gmi.lua?raw=1) | Syntax for the [Gemtext](https://gemini.circumlunar.space/docs/gemtext.gmi) markup language | | [`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_ini`](plugins/language_ini.lua?raw=1) | Syntax for [ini](https://en.wikipedia.org/wiki/INI_file) files | -- cgit v1.2.3 From 3c0545b9b78b1853a895cce4b8be25bbe12a0751 Mon Sep 17 00:00:00 2001 From: Ash-Coder-or-Not Date: Mon, 17 Jan 2022 02:10:02 +0530 Subject: small fixes --- README.md | 2 +- plugins/language_gmi.lua | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 7b459cc..742161d 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,8 @@ to something other than a raw file it should be marked with an asterisk.* | [`language_fstab`](plugins/language_fstab.lua?raw=1) | Syntax for the [fstab](https://en.wikipedia.org/wiki/Fstab) config files | | [`language_gdscript`](plugins/language_gdscript.lua?raw=1) | Syntax for the [Godot Engine](https://godotengine.org/)'s GDScript scripting language | | [`language_glsl`](plugins/language_glsl.lua?raw=1) | Syntax for the [GLSL](https://www.khronos.org/registry/OpenGL/specs/gl/) programming language | -| [`language_go`](plugins/language_go.lua?raw=1) | Syntax for the [Go](https://golang.org/) programming language | | [`language_gmi`](plugins/language_gmi.lua?raw=1) | Syntax for the [Gemtext](https://gemini.circumlunar.space/docs/gemtext.gmi) markup language | +| [`language_go`](plugins/language_go.lua?raw=1) | Syntax for the [Go](https://golang.org/) programming language | | [`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_ini`](plugins/language_ini.lua?raw=1) | Syntax for [ini](https://en.wikipedia.org/wiki/INI_file) files | diff --git a/plugins/language_gmi.lua b/plugins/language_gmi.lua index f478126..0804267 100644 --- a/plugins/language_gmi.lua +++ b/plugins/language_gmi.lua @@ -4,11 +4,12 @@ local syntax = require "core.syntax" syntax.add { + name = "Gemtext", files = { "%.gmi$" }, patterns = { { pattern = { "```", "```" }, type = "string" }, - { pattern = "#.-\n", type = "keyword" }, - { pattern = "%*.*\n", type = "keyword2" }, + { pattern = "#.-", type = "keyword" }, + { pattern = "%*.*", type = "keyword2" }, { pattern = "=>", type = "function" }, { pattern = "!?%[.-%]%(.-%)", type = "function" }, { pattern = "https?://%S+", type = "literal" }, @@ -18,4 +19,4 @@ syntax.add { { pattern = ".*=>", type = "normal" } }, symbols = { }, -} +} \ No newline at end of file -- cgit v1.2.3