alefragnani / vscode-language-pascal

Pascal language extension for Visual Studio Code
MIT License
222 stars 47 forks source link

[FEATURE] - Evaluate integration with DelphiLSP #91

Open alefragnani opened 3 years ago

alefragnani commented 3 years ago

Evaluate the possibility to integrate (replace) global/ctags with DelphiLSP (at least for Windows).

vmaskmovps commented 3 months ago

What's currently stopping you from integrating one of the existing language servers? Have you done any progress in this regard? If not, I could try integrating pascal-language-server (I am not specifically interested in DelphiLSP, since the proprietary extension already exists, but it should be easy to integrate). After a cursory glance at the current architecture, you'd have to redesign the entire backend to decode LSP messages instead of getting the symbols from global. Am I right?

alefragnani commented 3 months ago

Hi @overanalytcl ,

The main reasons are because I'm not using Delphi as my main programming language anymore, and the previous CE versions didn't provide the DelphiLSP to play with. So, any research on this subject stayed on hold.

I didn't know there was a pascal-language-server available, but if it works on the basic features, and is able to replace gtags and global, it is already good news. Specially if it is cros-platform/free/oss. Could you provide the project's link, so I could take a look.

About the changes in the extension, you are right. Using a LSP requires a bit more work, but it is doable

If you are willing to try out incorporating the LSP, feel free to do so, I would be happy to see updates on this, and be able to remove gtags and global dependencies .

Hope this helps

vmaskmovps commented 3 months ago

Hi @alefragnani

These are the projects:

These are FOSS (for FPC only, at the moment) and it's maintained in part by one of the biggest FP team members (Michaël Van Canneyt).

As for Delphi, that should be up to the community to make a proper LSP, since Embarcadero won't do it. I had plans of making a new Pascal LSP decoupled from Lazarus (at the moment, pascal-language-server requires Lazarus trunk and FPC 3.2.x to compile, both which can easily be obtained using fpcupdeluxe, so that's not an issue), which could allow Delphi support as well in the future.

The architecture is a bit confusing at the moment, but I'm trying to get the hang of it to see what I can change.