@b4n commented on this pull request.


In src/symbols.c:

> +		plugin_extension_goto_perform(doc, pos, definition);
+		return TRUE;
  1. I think it's probably fine to always return TRUE and pretend it's handled. I'd have to check, but I doubt it'd change anything.
  2. I'm not really thinking it'd be better to pass the word, as said it probably makes sense for the extension to be trusted to know what a word is for a language it handles (although you're basically saying Geany is doing better than what your LSP plugin is currently doing, but that could change). My concern is that we are checking whether there's a word outside the call, meaning the extension still depends on what Geany things a word is.
    If we're happy with ignoring point 1 above, we could have this API return TRUE if the extension handled the request (which could just be "there's something that looks like a legit target, I'll try to go there", not necessarily meaning it did perform the action synchronously).

For point 2, it could lead to something like this:

if (! plugin_extension_goto_perform(…))
    keybindings_send_command(GEANY_KEY_GROUP_GOTO, GEANY_KEYS_GOTO_MATCHINGBRACE);

or

if (! plugin_extension_goto_perform(…))
    utils_beep();


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/3849/review/2100195108@github.com>