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:
- ctags parsers would live outside Geany's process so they wouldn't crash Geany, Geany could just restart the server if it happens.
- All communication would be asynchronous so ctags parsing wouldn't block Geany.
- 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).
- 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.
- 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:
- It would break the plugin API depending on the tag manager. It could be modified so plugins can access LSP directly.
- It would require some LSP plugin to be part of Geany
- This would require a dependency on some JSON-RPC library for the core Geany
- We would have to agree we want to go this way, an impossible task ;-)
- 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, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany/pull/3571/c1793696182@github.com>