> This plus the inline comments should cover most of what I found, and start 
> the discussion on this :) But basically I think this PR could probably land 
> in a "timely" manner. 

How should I proceed? I'd suggest modifying the current PR to possibly use the 
list of PluginExtensions, modifying the `_available()` functions plus the other 
minor suggestions you had. But I'd leave the Geany refactoring (which I think 
is a good idea) to a separate PR that comes afterwards. Even if it means we run 
into something that requires the API modification - in any case, in it's 
documentation I'd write that the API isn't stable in case we run into something 
in the next Geany releases.

Also, I'd like to finally get rid of the `geany-lsp` combined repo and have one 
official version that has everything necessary in Geany. I'd then ask for some 
early feedback in https://github.com/geany/geany/issues/2184 before the actual 
release.

> I know Thomas won't like the absence of the symbols tree here, but IIUC 
> pros/cons are not so clear with the reality of things. And we can always add 
> this later if wanted.

I don't want to make the impression that I want to monopolize the LSP stuff for 
this plugin only. Of course there could be something like
```C
void lsp_get_document_symbols(GeanyDocument *doc, GCallback callback, gpointer 
user_data);
void lsp_get_workspace_symbols(GeanyDocument *doc, const gchar *filter, 
GCallback callback, gpointer user_data);
```
where the callback returns an array of the symbols but I strongly suggest not 
to use `TMTag` for the symbols as their meaning is different in LSP and there's 
no clear 1:1 match. I think such an API should mirror the LSP interface.

Such an attempt is in the final patches of 
https://github.com/geany/geany/pull/3850 and the result is one has to check all 
the time whether the TMTag comes from LSP or TM. If someone has some better 
ideas, I'm totally open to them.

Also, it would be good to know what such a plugin that wants to use this 
interface would like to do - the only thing I can imagine is some other variant 
of the "Goto panel" I added both in the LSP plugin and ProjectOrganizer or some 
other form of the symbol tree - for anything else one just cannot be sure what 
the `name` or `detail` of the symbol contains (one can just blindly display 
those).


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

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

Reply via email to