This patch converts the currently used groups like "Programming languages", "Scripting languages", etc. to groups based on the starting letter of the language only. There are two main reasons for this change:
- Some languages are hard to categorize by some semantic group name and the group names are not really fitting. In addition, the currently used group name "Programming languages" isn't very good as "Scripting languages" are also a subset of programming languages. On the other hand it's hard to find a good substitute for "Programming languages" - mostly these are "Compiled languages" but not always and some languages allow to be both interpreted and compiled which complicates the situation.
- The "Programming languages" group is too big and the menu is so long that it doesn't fit the display on smaller screens and one has to scroll the menu to get to the right item which isn't user friendly. Things will get only worse as there are still many "Programming languages" that Geany does not support yet and that might be added to the editor in the future.
The newly introduced alphabetic groups are:
A-B
C
D-E-F
G-H-I
J-K-L
M-N-O
P-Q
R-S
T-U-V-W
X-Y-Z
These allow roughly even distribution of existing languages into smaller groups with enough space for possible future language additions. While it would be possible to make the group names more symmetrical, e.g. by having "R-S-T", "U-V-W", I found that the asymmetry helps quicker navigation as one remembers the group with his favorite language is e.g. "the one before the long group" without thinking where exactly in the alphabet the letter is.
Some notes to the implementation:
- It mostly follows the existing implementation trying to do minimal changes and doing things in a "dumb and straightforward way". This means that group names are hard coded (they could also be autogenerated, possibly auto-attempting to distribute languages into evenly sized groups).
- Technically this change breaks API as it modifies GeanyFiletypeGroupID which is used for the group member of GeanyFiletype which is accessible to plugins. However, this member isn't documented to plugins and no existing plugin from geany-plugins uses it so probably not a big problem.
- Because grouping happens automatically now, the [Groups] section from filetype_extensions.conf can be removed and is not read any more.
- Because grouping happens automatically now, the [5] argument from FT_INIT() can be removed.
- In addition, this patch also removes the [4] argument from FT_INIT() which determined the suffix in the filetype menu like "C++ source file" - IMO the "source file", "file", etc. suffix for all the languages in the menu introduced just a visual clutter and made legibility worse. In addition with the removal of [Groups] from filetype_extensions.conf in (3), it would not be possible to determine the right suffix for custom file types.
- The newly introduced groups are untranslatable strings - there should be no need to translate those.
For some more context, see #3938 (comment) and below.
A few screenshots with the new grouping:
Screenshot.2024-10-06.at.14.35.12.png (view on web)
Screenshot.2024-10-06.at.14.36.18.png (view on web)
Screenshot.2024-10-06.at.14.37.18.png (view on web)
You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3977
Commit Summary
- 0a7d5b1 Regroup filetypes by letter
File Changes
(4 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/3977@github.com>