On the implementation

I had some time to look at it finally. There are no glaring issues I can see at first scan.

@b4n

I'm not fond of the implementation, but it might be a good first step. I'll have to check the plugin to get a better grasp on some design decisions maybe, but basically I think it'd be better to unify the current code instead of having some if (lsp) at key places.

IIUC the point of this is to step reasonably lightly on the Geany code (at this stage, the full takeover is later :-). Bear in mind that LSP is asynchronous, but Geany and plugins are resolutely synchronous, it may not be a drop-in replacement. It seems to me that this achieves the "lightly" given how much functionality it adds to an application that builds in so much (that should be in per language plugins, stir).

For more intrusive changes and maybe some planning around them I made #3675 for discussion, please contribute.

Python

Opening a single Python file (scripts/gen-api-docs.py) was even more painful than with clangd: nothing seemed to work (pylsp 1.7.1 from the headers).

With pylsp 1.9.0 it seems to work for me. pip install python-lsp-server then edit command path in Tools->LSP client->User Configuration->[Python]->cmd= since I don't have ~/.local/bin in my path.

Misconceptions

Basically, LSP isn't entirely the holy grail I though it might have been?

And the surprise is? If you believed that then I have a bank account for you to contribute to ;-)

Nothing is perfect, its a case of getting enough to be worth it. And that may depend on the language you use, if Geany isn't to stagnate as a C IDE it has to handle language features that ctags parsers can't, inferred types, generics, overloaded names. The best current technology that can be leveraged to provide that is the LSP server. To date Geany has lived with imperfect TM/ctags, don't let the fact that LSP servers are also imperfect blind you to the significant benefits they bring to languages with complex features.


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/c1817359221@github.com>