@b4n commented on this pull request.

I can't say much about the language itself, but it seems to give reasonable results with the provided sample. See below for a couple comments.


In data/filedefs/filetypes.HCL.conf:

> @@ -0,0 +1,40 @@
+# For complete documentation of this file, please see Geany's main documentation
+[styling=C]
+# style "preprocessor" as comment, as for HCL lines starting with "#" are comments
+preprocessor=comment
+
+[keywords]
+# all items must be in one line
+primary=data local locals module provider resource terraform var

There is neither variable nor output, yet those look like keywords in the simple.ft test file, aren't they?


In data/filedefs/filetypes.HCL.conf:

> +# style "preprocessor" as comment, as for HCL lines starting with "#" are comments
+preprocessor=comment

Hum… sounds like a hack :) I would suggest giving [styling=HTML] and lexer_filetype=Zephir a try. It looks a bit weird with the default colors because for some reasons strings are getting green, but Zephir being basically PHP it has all of #, // and /* */ comments builtin. Just a suggestion, the hack here seems to work.


In data/filedefs/filetypes.HCL.conf:

> @@ -0,0 +1,40 @@
+# For complete documentation of this file, please see Geany's main documentation
+[styling=C]
+# style "preprocessor" as comment, as for HCL lines starting with "#" are comments
+preprocessor=comment
+
+[keywords]
+# all items must be in one line
+primary=data local locals module provider resource terraform var
+# for autocompletion tags, see https://wiki.geany.org/tags/start#hcl_terraformopentofu_tags
+
+[lexer_properties=C]
+styling.within.preprocessor=0

An explanation of the relation to the comment hack would be welcome here


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/4246/review/2628112506@github.com>