If refactoring of 'Custom Highlighting' menu is planned (which is mentioned in the wiki https://sourceforge.net/p/texstudio/wiki/Frequently%20Asked%20Questions/#how-does-the-custom-highlighting-work), there are few more feature requests:
changes font inside environment
\begin{ttfamily}
text
\end{ttfamily}
to green, but have no effect to commands
\ttfamily{text} and \texttt{text}
And there is no way to change text highlighting inside that commands.
The possibility to select custom highlighting for text inside braces {} that follows any LaTeX command (e.g. \texttt{text}, \title{text}, etc.) would be great.
Anonymous
very unlikely
BTW,
\ttfamily{text}is not the right way of using\ttfamily. This command is a switch and its scope is limited by a group (e.g.{...}) placed outside:{\ttfamily text}.Furthermore, environments are discouraged beacuase of spurious spaces they generate.
From the current point of view, I'd rather say that the custom highlighting will be removed rather than extended. This approach does not harmonize with the internal structure and is not flexible enough.
If you really need extended highlighting customization, go for the customization of the language definition.
I'm not saying that to do so correctly. It was just a sample. E.g. changes to 'verbatim' environment in 'Syntax highlighting' menu takes effect on highlighting for both \begin{verbatim}text\end{verbatim} and \verb|text| entries. And that there must be a way to obtain the same behavior for any other environment.
I agree that something must be done, and that my suggestions are not the best.
The current situation with 'Custom Highlighting' menu is a half measure. But even using language definition leaves the question open: why some (built-in) environments can be customized through 'Syntax highlighting' menu and others only by language definition. Ie the same things are done in two different ways
If you look into the language definition, you'll see that this is encoded there.
Originally, the language definition was not accessible to the user. The 'Custom Highlighting' was then introduced as a concept to provide some configurability. However, it does not scale. Neither in configurability (you need to do code-changes to add new types of environments), nor in performance (it takes extra parsing and internal patching of the data model). This is a dead end, which would probably better have been removed to prevent the false impression, that it's actually something useful. Modifying the language definition is the way to go.
Forget about 'Custom Highlighting' menu, besides seems that you've already made the decision. My last question was concerning 'Syntax highlighting' menu. Why some (built-in) environments can be customized through a graphical interface, and others only by language definition. Yet again, same things are done in two different ways.
Last edit: sav 2015-12-10
Because the (built-in) environments and their format types (e.g. 'verbatim') are defined in the default (built-in) language definition. Additionally you have to define, what the type should look like (typeface, color, ...). The UI interface to this dates back to the time, in which the language definition was considered fix. Therefore, the fromat types to be configured by the UI have to be specified at compile time, which is of course then limited to the built-in format types.
That's the historic background and explanation. Other than that, I can just quote from the manual:
Note: We expose the language specification to you as end-user to give you more flexibility in adapting TeXstudio to your needs. But you should take it as is, because we don't have the capacity to give support here. It's a powerful API, but neither polished nor fully featured.
Customization of what to highlight (not only how) is just an add-on, not a core feature of TXS.
Last edit: Tim Hoffmann 2015-12-10