OmniPascal 0.19.0 – Pas2Js ASM blocks with JavaScript

Changes in in this version:

  • Syntax highlighting for inline JavaScript asm blocks through “// JavaScript” or “// js” indicator
  • Improved code completion in attributes
  • Fixed an issue where a missing implementation warning appeared on methods with anonymous function declarations in their implementations
  • Parser fixes

Special thanks go out to TMS Software! They take advantage of OmniPascal for their famous product TMS WEB Core. Check it out on

OmniPascal 0.15.0 – Overloaded and generic methods

Generic method call
Generic method call

This release brings a lot of improvements regarding understanding of language features as well as bugfixes. Read the complete change log:

  • Enhancement: Resolving calls to overloaded methods works much better now. In previous releases calls to overloaded methods were resolved to the first method that could be called with the given amount of arguments. Now OmniPascal takes the types of the arguments into account.
  • Enhancement: Added support for methods with generic parameters and basic type inference
  • Change: Types and methods appear with generic parameters in code completion
  • Enhancement: When a code completion item with generic parameters is selected then the first generic parameter is marked and can be changed immediately. You can jump to the next generic parameter using tab
  • Enhancement: Go-to-definition works (as good as possible) on method calls even when the amount of arguments doesn’t match the method’s signature
  • Change: Go-to-definition performed on a parameter now jumps to the method’s declaration if possible instead of the implementation
  • Enhancement: The parser is much more tolerant with FreePascal source files. It no longer crashes on keywords like generic, specialization and constref. Code completion works much better in FPC project.
  • Enhancement: Code completion works on variables of a generic constrained type
  • Enhancement: All classes implicitly inherit from System.TObject. All interfaces implicitly inherit from System.IInterface. In the past Calls to SomeObject.Free could only be resolved if the object’s class inherits implicitly from TObject.
  • Enhancement: Code completion items have more different symbols now based on their kind New code completion icons
  • Enhancement: Code completion items are ordered by relevance. In the past they were ordered alphabetically
  • Change: Minor changes of symbols shown in the list of document sybols
  • Enhancenment: Default namespaces are loaded from DPROJ files
  • Enhancement: Values of scoped enums no longer appear in general code completion
  • Enhancement: Generated tasks.json defines default tasks
  • Bugfix: Automatic regeneration of build scripts didn’t work on Windows when the loaded project file changed
  • Bugfix: Parser crashed when attempting to include a file with BOM header
  • Bugfix: Go-to-definition of a symbol defined in an included file didn’t work
  • Bugfix: Method calls like “read()” or “write()” are no longer displayed as keywords (at least when followed by round brackets)
  • Bugfix: Calls to full qualified type members are now resolved properly
  • Bugfix: When a pointer to a record type was declared before the record then the record’s members didn’t appear in code completion when triggered for a variable of the pointer type.
  • Bugfix: Unit’s created via the lightbulb’s quickfix “Create new unit” were displayed with an error saying the unit name was wrong.
  • Bugfix: Automatic interface implementation no longer adds include files to uses
  • Bugfix: External methods didn’t appear in code completion
  • Bugfix: OmniPascal did become very slow when huge files with a lot of overloaded methods (like System.SysUtils) were opened in VSCode
  • Bugfix: Creating warnings for missing method implementations was very slow when a file had a lot of overloaded methods
  • Bugfix: Indexed access on arrays returned from methods didn’t work
  • Bugfix: Generic type parameters no longer appear in the list of document symbols
  • Bugfix: Correct handling of visibility sections in record types
  • Bugfix: Removed squiggly lines for unresolvable uses entries coming from an included files. They showed up as ghost erros in areas without matching text.
  • Bugfix: Generic type parameters did show up in derived classes’ code completion
  • Bugfix: The Result variable has now the correct type inside anonymous functions
  • Improved performance for code completion and symbol resolving. Much better performance of multi threaded operations.

OmniPascal 0.14.0 – Mac and Linux support

Running OmniPascal on Ubuntu

OmniPascal has finally arrived on Mac and Linux! All the features you know from the Windows version are now available also on Unix like operating systems. These are:

  • Code completion
  • Go to declaration
  • Outlining
  • Automatically implement methods and interfaces
  • Add units to uses without scrolling
  • Load search path from project files
  • Auto generate build and run scripts from Lazarus and Delphi* projects for compiler integration into VSCode

Please keep in mind that the built in Pascal parser has support for Delphi syntax only. So you won’t see great support for ObjectPascal source files using a different dialect. That may change in the future.

*Build scripts for Delphi projects work on Windows only

How to install

  • Install and open Visual Studio Code
  • Click on the extensions icon in the left menu bar
  • Search for omnipascal and press install

Please ensure your system allows execution of software from any location!
If you have any problems getting started then please create a bug report, ask on StackOverflow or create a comment under this blog post.
Since this is the first release of OmniPascal for Mac and Linux it’d be a surprise if everything was working right from start.

Release notes

  • First release of OmniPascal for Mac and Linux (64 bit)
  • Change: Generated build and test tasks now run in VSCode’s new terminal runner. That fixes the bug of infinite test runs when the application is waiting for user input via Read/ReadLn.
  • Enhancement: The project file picker now also lists .dproj and .lpi files
  • Bug fix: The project file picker was incomplete when opened right after starting the editor
  • Enhancement: Improved recognition of file encoding when no BOM is present
  • Bug fix: sometimes OmniPascal forgot the where Delphi is installed
  • Bug fix: Constructor calls to overloaded generic types didn’t resolve properly
  • Bug fix: Code completion now works in DUnitX tests
  • Bug fix: Interface implementations via resolution clauses in generic types were not recognized
  • Bug fix: Occasionally wrong missing interface implementation warning for derived classes where the base type implements an interface in the private section in a different file
  • Internal reliability improvements

OmniPascal 0.12.0 – Add units to uses clauses

This GIF shows how “Implement interface” automatically adds System.TypInfo to the uses clause and how the new “Add unit to uses” command works.

New features:
– Execute Add unit to uses in order to add a unit to a uses clause without navigating to the top. Open the command palette (by pressing F1 or CTRL+SHIFT+P) and type “Add unit to uses”. Select the uses clause and a list of all available units will appear. Select the one you want and press enter. The command is also bound to ALT+U
– Automatic implementation of interfaces adds missing units to the uses clause
– Member of typed pointers can be resolved

– Creation of errors and warnings does no longer stop working after a while
– Constants in classes are now resolved properly
– Indexed access on constant resolves now to the definition of that constant / constant array
– Fixed random crashes

Notable changes:
– General performance improvements. Especially startup and code completion are much faster.

Version 0.11.0 – Implement interfaces

Change log:

  • New warnings for incomplete interface implementations
  • Quickfixes for incomplete interface implementations create method declarations and implementation stubs
  • Fixed compatibility to Visual Studio Code 1.7.0
  • Improved the text that pops up up when hovering a constant
  • Fixed code highlighting in hover popup
  • Bugfix: Hovering a method call now shows the signature of the method’s declaration instead of its implementation
  • Bugfix: “Implement method” produced broken code for methods with open array parameters
  • Bugfix: Method resolution clauses were creating warnings for missing implementations
  • Bugfix: UTF8 files with and without BOM are now handled properly
  • Bugfix: Wrong declaration found when a method parameter has the same as a property
  • Bugfix: Directories having the “hidden” or “system” attribute set were invisible to OmniPascal
  • Bugfix: Message “Ordner nicht angegeben” when opening .pas file from explorer
  • Calls to members of a constructor’s return type can be resolved: Example: TObject.Create.Free
  • Improved performance and stability

OmniPascal 0.10.0 – Intrinsic symbols and castings

– Members of type casted identifiers can be resolved
– Code completion works even when working with type casts
– Basic data types like Integer or String appear in code completion
– Added support for Delphi Intrinsic Routines for Windows 32 platform
– True, False and Nil now appear in code completion
– Added support for pointer types

– Names of nested types in generic classes couldn’t be resolved in method implementations
– Names of nested strict private types can be resolved
– Code completion list doesn’t grow anymore when triggered multiple times in classes which inherit from a specialized generic class
– Fixed occasional crashes of OmniPascalServer.exe when editing code with multiple cursors
– Calls to overloaded methods weren’t always resolved correctly based on the parameter count. (Resolving calls to overloaded methods still doesn’t work when multiple versions of a method accept the same amount of parameters)
– Members of items in generic arrays can be resolved
– Name resolving and code completion for symbols defined in the implementation section now works in initialization and finalization section

…as well as some speed improvements.

OmniPascal 0.9 – Namespaces and more

– The search path will be indexed on start up
– Code completion in uses sections suggests known unit names
– Support for full qualified names like System.Classes.TStringList
– Code completion only suggests types and namespaces when only a type name makes sense in the current context
– Code completion in interface declarations suggests a GUID
– An error is displayed when a unit name doesn’t match its file name
– An error is displayed for duplicate entries in uses section
– An error is displayed for unresolvable entries in uses sections
– A lightbulb appears on unresolvable uses entries which allows to create that file in the current folder
– Hints of hoverered unit names in uses sections look nicer
– Definitions of redeclared properties can be resolved and are part of code completion
– It’s possible to jump to the initial declaration of a redeclared property
– Support for hidden namespaces in uses section (for example “Classes” can be resolved to “System.Classes”)
– Code completion is disabled when defining a new symbol

– Code completion used the wrong scope from time to time especially when hitting the dot inside of if-statements or brackets.
– Signature help now highlights the current parameter as soon as the comma is entered
– Signature help didn’t work when used on a member’s method of an object like ObjectA.Member.Find()
– Warnings for incomplete method definitions in included files were created
– Go to a definition of a symbol which is defined in an included file no longer opens the including file but the include file
– Symbol definitions of included files were part of outlining
– No warnings have been created for missing implementations of overloaded methods if one of those methods already had an implementation
– UTF8 files with BOM header can be parsed now
– Protected symbols which should be invisible were part of code completion in special cases
– References to out parameters without type information (void types) can be found
– Quickinfo for variables of type “file” contained no type information
– Code completion showed empty suggestion item
– Code completion in specialized generic descendants didn’t include protected members of non generic base classes
– Parameterized type names in static method calls couldn’t be resolved
– Method names in static method calls on parameterized type names couldn’t be resolved
…as well as some speed improvements.

OmniPascal 0.8.1 released

New features
– Syntax errors are displayed in the editor
– Method definitions without implementations produce warnings
– Warnings for missing implementations provide a quickfix that creates an empty implementation stub for it. TIP: Open the lightbulb with CTRL+.
– Additional search paths can be defined in configuration file using the "objectpascal.searchPath" parameter. Paths are separated by ;. TIP: "D:\\ThirdPartyComponents\\*" will add the folder "D:\ThirdPartyComponents and all its subfolders recursively to the search path.
– DPR files have now support for code completion
– DPR files have now support for outlining

Bug fixes
– Code completion cleaned up from internal compiler methods
– It was impossible to go to the declaration of a procedure that was not a class member
– Fixed undefined internal file state that occured from time to time
– Parameters were not always displayed correctly when hovering a method

– Toggle Method declaration/implementation has become more error tolerant
– Outlining huge files is >10 times faster now
– Create code completions in huge files is >20 times faster now
– OmniPascal generally runs faster and consumes less memory
– Some words like as, mod,div etc. are temporarily not displayed as operators (gray in dark default theme) but as keywords (blue). This change has become necassary as Visual Studio Code broke some details in syntax highlighting with the latest release. Probably operators will be displayed in gray again in the future.