Jump to content
Al T

How to use an external editor like VScode and GitHub Copilot for Delphi 11 Alexandria?

Recommended Posts

I'm trying to figure out if this is even possible.

 

It seems that GitHub Copilot only works with a select few editors.

 

Which external editor would work best with Delphi so that GitHub Copilot could be used?

 

Any ideas?

 

 

 

Share this post


Link to post

Thank y'all!

 

I was able to get DelphiLSP working with VScode only after I deleted my serial numbers and registered them again.

 

Share this post


Link to post

Delphi/pascal file in IntelliJ IDEA and Copilot suggestions.

With I-Pascal plugin for IntelliJ (available for versions before 2022.1) - https://plugins.jetbrains.com/plugin/7340-i-pascal

 

In the editor on the left side - suggested auto-complete
On the right side - copilot panel with multiple suggestions

 

Without hint

image.thumb.png.ac5edde72a725c3a45ad1f410be67688.png

 

With hint (the comment on the first line)

image.thumb.png.8ffa7166daf591f57f2bc5b776352d6a.png

  • Like 1

Share this post


Link to post

I've never heard of the Delphi IDE "using" an external editor. The integration between the editor and the rest of the IDE (designer, object inspector, tool palette, etc) would likely need a heavy refactor or rewrite. But as  @Lars Fosdal mentioned, you can edit Pascal source in any text editor. The project below is a Delphi plug-in that adds a command to the Tools menu to open the current unit in Visual Code. With a little configuration, you could switch between Delphi and Visual Code at will, taking advantage of features in Visual Code such as Copilot.

 

EditInVsCodeDelphiPlugin

  • Thanks 1

Share this post


Link to post

If the form designer of Delphi could be called out-of-process, it could be paired with VSCode, and personally, I really like VSCode.

Then again, the shortcuts in the BDS IDE are engrained in my muscle memory...

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×