diff options
author | kramo <93832451+kra-mo@users.noreply.github.com> | 2024-02-01 20:29:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 20:29:19 +0100 |
commit | 66a42c3e87c9b2c8395af232572c5fd0513e86d6 (patch) | |
tree | d1a6c457c9bcf990630547b34363cb71b74c9605 | |
parent | f3efbe86a457786afb5cb9993772cec2fc8e8815 (diff) | |
download | lite-xl-plugins-66a42c3e87c9b2c8395af232572c5fd0513e86d6.tar.gz lite-xl-plugins-66a42c3e87c9b2c8395af232572c5fd0513e86d6.zip |
Fix Haskell comments, add block_comment (#358)
* Fix Haskell comments, add block_comment
`-` Was incorrectly escaped before
* Update Haskell comment pattern
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | plugins/language_hs.lua | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/manifest.json b/manifest.json index 1a229f9..f4d5c32 100644 --- a/manifest.json +++ b/manifest.json @@ -826,7 +826,7 @@ }, { "description": "Syntax for the [Haskell](https://www.haskell.org/) programming language", - "version": "0.1", + "version": "0.2", "path": "plugins/language_hs.lua", "id": "language_hs", "mod_version": "3", diff --git a/plugins/language_hs.lua b/plugins/language_hs.lua index 4271210..39dbc7a 100644 --- a/plugins/language_hs.lua +++ b/plugins/language_hs.lua @@ -4,9 +4,10 @@ local syntax = require "core.syntax" syntax.add { name = "Haskell", files = { "%.hs$" }, - comment = "%-%-", + comment = "--", + block_comment = {"{-", "-}"}, patterns = { - { pattern = {"%-%-", "\n"}, type = "comment" }, + { pattern = "%-%-.*", type = "comment" }, { pattern = { "{%-", "%-}" }, type = "comment" }, { pattern = { '"', '"', '\\' }, type = "string" }, { pattern = { "'", "'", '\\' }, type = "string" }, |