@techee commented on this pull request.


> +             plugin_extension_goto_perform(doc, pos, definition);
+               return TRUE;

1. I think it's only used in `on_editor_button_press_event()` to return 
TRUE/FALSE whether the event was performed or whether it should be propagated 
further. I don't see an easy solution with the LSP plugin because the call to 
the server is asynchronous and we don't know the result at the moment when 
`plugin_extension_goto_perform()` finishes. But I'd say returning TRUE that the 
event was processed is fine here.
2. I wanted to raise this separately but for word detection I currently use a 
modified version of 
https://github.com/geany/geany/blob/96e6fb7d3d924354a1bc9226f389124d29506010/src/editor.c#L1683
 which uses hard-coded `GEANY_WORDCHARS` and not those defined in filetype 
configuration. This is bad both for Geany itself and the plugin because CSS for 
instance uses `-` inside identifiers or LaTeX uses `:` inside labels and this 
then breaks the identifiers. I think there should be an API version of 
`read_current_word()` that takes  configured identifier characters into account 
which is used both by Geany and plugins. As for the parameter `name` itself, it 
could be passed to the API but it's kind of unnecessary as the plugin can get 
it by itself.

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

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

Reply via email to