@techee commented on this pull request.


> +     gboolean (*goto_perform)(GeanyDocument *doc, gint pos, gboolean 
> definition, gpointer data);
+
+       /**
+        * Pointer to function called by Geany to check whether the plugin 
implements
+        * additional symbol (e.g. type) highlighting in Scintilla.
+        *
+        * @see @c autocomplete_provided() for more details.
+        * @note There is no function in the @c PluginExtension structure 
informing
+        * plugins to perform symbol highlighting. Plugins
+        * implementing symbol highlighting should perform it at the appropriate
+        * moments based on Scintilla and Geany events such as when the document
+        * becomes visible or when the document is modified.
+        *
+        * @since 2.1
+        **/
+       gboolean (*symbol_highlight_provided)(GeanyDocument *doc, gpointer 
data);

> This (colorization of keywords vs types) has always been a (minor) annoyance 
> and I'm wondering why Geany can't do this right (I always assumed that it's a 
> strict Scintilla limitation)?

Pretty much what @elextr said - type names in Geany are obtained from ctags and 
then added to Scintilla as "keywords" so they get colorized but ctags cannot 
(and never will) provide the information where the given type is used so we 
won't be able to colorize the precise instances, just all of them. On the other 
hand, you get these from the LSP server from the "semantic token" call with 
exact ranges so these can then be colorized precisely (when `INDIC_TEXTFORE` 
colorization is enabled).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3849#discussion_r1671819508
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3849/review/[email protected]>

Reply via email to