@techee 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
Oh, I somehow didn't post the right version of the patch - in the correct one I
also added `gchar padding[1024]` at the end of the struct. Plugins will have to
allocate this struct with `g_new0()` or on the heap so the rest of the struct
is zero and those `CALL_IF_EXISTS()` macros check the NULL and fall back to
some empty implementation.
> Furthermore, these kind of register functions should also pass the
> GeanyPlugin to give Geany some context.
Could you add more detail what this would be good for?
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3571#discussion_r1346499088
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3571/review/[email protected]>