@kugel- commented on this pull request.


> +G_BEGIN_DECLS
+
+typedef struct {
+       gboolean (*autocomplete_available)(GeanyDocument *doc);
+       void (*autocomplete_perform)(GeanyDocument *doc);
+
+       gboolean (*calltips_available)(GeanyDocument *doc);
+       void (*calltips_show)(GeanyDocument *doc);
+
+       gboolean (*goto_available)(GeanyDocument *doc);
+       void (*goto_perform)(GeanyDocument *doc, gboolean definition);
+} Lsp;
+
+
+void lsp_register(Lsp *lsp);
+void lsp_unregister(Lsp *lsp);

I would also pass the size of the `Lsp`. Reason: If you extend the struct for 
new function points you can't be sure if the plugin that's registering is 
already compiled against the new size, unless you also bump the ABI. To avoid 
having to bump the ABI the plugin can pass `sizeof(Lsp)` that it was compiled 
against, and Geany can pad with NULLs up to the actual size.

Furthermore, these kind of register functions should also pass the 
`GeanyPlugin` to give Geany some context.

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

Message ID: <geany/geany/pull/3571/review/1658498...@github.com>

Reply via email to