htmlpolymersyntax-highlightinggeany

Is it possible to make geany also highlight unknown HTML-tags?


I'm currently playing around with Polymer and then you often use custom tags, such as <paper-icon-button icon="menu" on-tap="...">...</paper-icon-button></code>. But geany doesn't highlight them like normal HTML-tags (bold blue for <div and >, bold darkblue for class=, medium green for "label") – The whole text is displayed in medium blue.

Here's a demonstration of both types of tags:

Heres a demonstration of both types of tags

Now my question: Is it possible to make geany also highlight unknown HTML-tags? Or, can you install another syntax highlighter that solves my problem?

Thanks in advance!


Solution

  • You can add keywords to a custom filetypes.html.

    Copy this file from your Geany-installation-dir/data to your .config-folder of Geany -- on Linux this will be somewhere at ~/.config/geany/filedefs ; on Windows it will be somewhere like this C:\Users<user>\AppData\Roaming\geany\filedefs and add your new tag as a keyword.

    The file is a normal key-value with section, so you will find something like that inside:

    [keywords]
    html=a abbr acronym address applet area b base basefont bdo big blockquote ....
    

    That's the point you need to add your new keywords. the current upstream version of the file can be found at https://github.com/geany/geany/blob/master/data/filedefs/filetypes.html