When I highlight a few lines and select 'format->Comment lines` nothing happens. Is there a way I can customize something so that Geany would know which comment character to use for meson.build files?
You probably could make a usable [custom filetype](https://www.geany.org/manual/current/index.html#custom-filetypes) using the Python lexer and parser, see filetypes.Cython.conf as an example. That would let you set comments etc.
@elextr thanks. So far after an hour I haven't been able to get any results. Where I'm at now is I have the file `filetypes.Meson.conf` in my user/filetypes dir.
``` [styling=Python]
[keywords] primary=if else elif endif foreach endforeach true false identifiers=ArithmeticError AssertionError AttributeError BaseException BufferError BytesWarning DeprecationWarning EOFError Ellipsis EnvironmentError Exception False FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError KeyError KeyboardInterrupt LookupError MemoryError NameError None NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning ReferenceError RuntimeError RuntimeWarning StandardError StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError True TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning ZeroDivisionError __debug__ __doc__ __import__ __name__ __package__ abs all any apply basestring bin bool buffer bytearray bytes callable chr classmethod cmp coerce compile complex copyright credits delattr dict dir divmod enumerate eval execfile exit file filter float format frozenset getattr globals hasattr hash help hex id input int intern isinstance issubclass iter len license list locals long map max min next object oct open ord pow print property quit range raw_input reduce reload repr reversed round set setattr slice sorted staticmethod str sum super tuple type unichr unicode vars xrange zip
[lexer_properties=Python]
[settings] lexer_filetype=Python tag_parser=Meson extension=build comment_single=# mime_type=text/x-meson ``` Any other clues you could give me would be appreciated.
Oh... I got it working. I had to edit `filetype_extensions.conf` and add `Meson=*.build`
As noted on #1734 there isn't a tag parser for meson, and other than custom targets I'm not sure what symbols you would make for Meson even if here was one.
So the odd thing is that I noticed the syntax highlighting is only working for some of my projects. I think... 3 out of 6 I checked. Why would that be?
First check they all have been detected as meson filetype.
Thanks, I see now "Document->set filetype"
Note that if detecting filetype is getting the wrong answer its probably because Geany checks contents in preference to extension. This is required to detect the millions [slight exaggeration for effect] of different things that live in `.html` files, and its probably detecting your meson as some other type and never checking the extension, try having a shebang saying meson.
github-comments@lists.geany.org