@b4n commented on this pull request.


> +             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:
```c
if (! plugin_extension_goto_perform(…))
    keybindings_send_command(GEANY_KEY_GROUP_GOTO, 
GEANY_KEYS_GOTO_MATCHINGBRACE);
```
or
```c
if (! plugin_extension_goto_perform(…))
    utils_beep();
```

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

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

Reply via email to