Now there are more than 300 languages for syntax highlighting and the current menu to select them isn't comfortable, since it's slow to find any language. That is why I propose a new menu with scrollable list plus search bar. This menu is accessible only from the status bar and is equivalent to the "Mode" menu.
- You can type in the search bar and browse the list with the keyboard, simultaneously.
- The menu is kept synchronized with the classic "Mode" menu.
- When pressing Enter or clicking, a syntax highlight is selected and the menu is hidden; when pressing Ctrl + Enter, highlighting is selected keeping the menu visible.
- The items of languages are separated by sections, this keeps the list more ordered. The search bar has special features:
- Alphabetical search when writing a single character. For example, when looking for a, all the items that begin with "a" are displayed, this allows you to search for items alphabetically in a more comfortable way.
Other changes in this diff:
- Before, in the classic "Mode" menu, the sections and names of languages were arranged alphabetically according to the original names, not the translated names. Now they are sorted according to the translated names.
- The "Normal" item in the Mode menu is now translated, since nowhere in the code is it translated.
- Before, in the "Highlighting" menu, the section names and the "None" item weren't translated, now they are translated.
- When displaying the classic Mode menu, it uses the traduced names, but it verifies the mode selected by the original names in sections. This means, that in languages other than English, the current Mode isn't showed selected (with the radio icon) in the menu. That is corrected.
- The menu was tested on Plasma with KDE Neon with X11 and Wayland.
- When changing Kate's color theme, the menu adapts correctly to the new colors.