diff --git a/README.md b/README.md index fd8bc210..8e240008 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ Plugin | Description [`language_elm`](plugins/language_elm.lua?raw=1) | Syntax for the [Elm](https://elm-lang.org) programming language [`language_fe`](plugins/language_fe.lua?raw=1) | Syntax for the [fe](https://github.com/rxi/fe) programming language [`language_fennel`](plugins/language_fennel.lua?raw=1) | Syntax for the [fennel](https://fennel-lang.org) programming language +[`language_fountain`](plugins/language_fountain.lua?raw=1) | Syntax for the [Fountain](https://fountain.io) screenplay Markdown syntax [`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 diff --git a/plugins/language_fountain.lua b/plugins/language_fountain.lua new file mode 100644 index 00000000..7811b021 --- /dev/null +++ b/plugins/language_fountain.lua @@ -0,0 +1,29 @@ +local syntax = require "core.syntax" +local common = require "core.common" +local style = require "core.style" + +style.syntax["header"] = { common.color "#66FF66" } +style.syntax["property"] = { common.color "#888888" } +style.syntax["paren"] = { common.color "#AAAAAA" } +style.syntax["caps"] = { common.color "#6666FF" } + +syntax.add { + files = { "%.fountain$" }, + patterns = { + { pattern = { "/%*", "%*/" }, type = "comment" }, + { pattern = { "%[%[", "%]%]" }, type = "string" }, + { pattern = { "%(", "%)", "\\" }, type = "paren" }, + { pattern = "#.*\n", type = "header" }, + { pattern = "[a-zA-Z ]+%: .*\n", type = "property" }, + { pattern = "[^a-zA-Z ]+.*%: .*\n", type = "normal" }, + { pattern = "INT[%. ].*\n", type = "function" }, + { pattern = "EXT[%. ].*\n", type = "function" }, + { pattern = "EST[%. ].*\n", type = "function" }, + { pattern = "INT%.?/EXT[%. ].*\n", type = "function" }, + { pattern = "I/E[%. ].*\n", type = "function" }, + { pattern = "[A-Z][^a-z]+\n", type = "caps" }, + + }, + symbols = { + }, +}