Recently we did some updates to our VS Code extension for Castle Game Engine and the Pascal LSP.
- VS Code extension now uses the FPC path you set for more things. Namely, the build tool (which is executed when you press “Compile” from VS Code) will reliably use this FPC. This means that there’s no need to have FPC on
$PATH
anymore to use CGE from VS Code. Just configure FPC location in VS Code and everything should “just work”.Further notes:
- Direct link to the extension in the marketplace.
-
We actively develop our VS Code extension, see the changelog for all details. I (Michalis) use it during all my work on the engine nowadays, so I really need it to be good and handle code in various stages of “in progress” 🙂
-
Reminder: The extension is useful for development of any Pascal projects, whether using Castle Game Engine or not. Pascal syntax highlighting and code completion (provided by LSP) work regardless of the Castle Game Engine. Only the “Compile”, “Run” features rely on CGE project (CastleEngineManifest.xml).
-
Our Pascal LSP (
pasls
binary present in engine downloads) also got updates. It now better reports errors, capturing all possible Pascal parsing errors and returning useful error messages for them — with filename, line and column number. The idea is that, when working, you naturally sometimes have a code that isn’t (yet!) correct, so the code tools sometimes cannot provide their services (completing, jumping to definition etc.). In such case it’s important that you get useful errors, why is your current code wrong.- Reminder: While nowadays we test our LSP mostly with our VS Code extension for Castle Game Engine, but it’s not limited to VS Code. Every editor that supports LSP, including Emacs and NeoVim should be capable of using this LSP for code completion in Pascal projects.
Start the discussion at Castle Game Engine Forum