This is a first attempt with little testing, but it seems to work pretty OK. However, please review all levels, from design to implementation.

To summarize, what this does is look for stylename.N for styles that are known to be sub-stylable1, as well as the corresponding keywords/identifiers2. From there, it's just regular styles one can map as usual.

One limitation I am already aware of is that as it's not regular keywords, it doesn't integrate with the code merging the ctags symbols into them. It could be possible to augment this to work, but with the current design this would need a way of representing this in the filetypes file (which would be good, but is not the case currently).

One arbitrary design choice was to use the syntax stylename.N. This is mostly because using stylename[i] is tricky/hacky using GKeyFile, because it looks similar to Scintilla's properties, and doesn't clash with any style name. Other suggestions are welcome.

Footnotes

  1. we unfortunately cannot use SCI_GETSUBSTYLEBASES because we don't have access to a Scintilla instance when loading style data. Hence adding a new field in HLStyle.

  2. Note here that this feature is styles-based in Scintilla, meaning that there is no regular keywords entry associated, it's defined as kind of a style property.


You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/3794

Commit Summary

File Changes

(5 files)

Patch Links:


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/3794@github.com>