Maybe one thing to add which I didn't mention previously because I didn't want 
the discussion to become too off-topic. But this is one of those PRs where the 
discussion got out of control so to hell with it :-).

I think it would make a lot of sense to make a LSP server from the tag manager 
and access it only through the LSP interface. I don't suggest it's something we 
should start working on, just one possibility to keep in mind. There would be 
several advantages of this:
1. ctags parsers would live outside Geany's process so they wouldn't crash 
Geany, Geany could just restart the server if it happens.
2. All communication would be asynchronous so ctags parsing wouldn't block 
Geany.
3. The ctags process would probably be scheduled on another CPU core so there 
could be a slight performance gain when both Geany does its stuff and the files 
are parsed in parallel (still, ctags isn't reentrant so no parallel parsing 
within the LSP process).
4. ctags LSP could be reused by any editor - basically all editors would get 
the basic support of many languages we offer in Geany using TM for free.
5. The interface would be just plain LSP so swapping ctags LSP for some other 
LSP like clangd wouldn't mean any change in the code.

The main disadvantages I see are:
1. It would break the plugin API depending on the tag manager. It could be 
modified so plugins can access LSP directly.
2. It would require some LSP plugin to be part of Geany
3. This would require a dependency on some JSON-RPC library for the core Geany
4. We would have to agree we want to go this way, an impossible task ;-)
5. And one small detail, someone would have to write all this, review it, etc.

Once again, I'm not proposing we should start doing that, I'm just recommending 
it as a thought exercise.

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

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

Reply via email to