From 66a42c3e87c9b2c8395af232572c5fd0513e86d6 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:29:19 +0100 Subject: 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 --------- Co-authored-by: Guldoman --- manifest.json | 2 +- 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" }, -- cgit v1.2.3