2

I've installed both FreePascal compiler and OmniPascal extension for VisualStudio code, but code completion doesn't work. In the manual you are saying that I need to write the path to Delphi compiler int the user settings, but nothing is said about FPC.

user2102508
  • 1,009
  • 11
  • 23

1 Answers1

2
  • Set the omnipascal.freePascalSourcePath setting to the folder that contains the FreePascal sources
  • Set the omnipascal.defaultDevelopmentEnvironment setting to FreePascal
  • Restart Visual Studio Code.

Example:

"omnipascal.freePascalSourcePath": "C:\\lazarus\\fpc"
"omnipascal.defaultDevelopmentEnvironment": "FreePascal"

This will instruct the OmniPascal language server to lookup Pascal units (.pas and .pp files) in that directory and all its subtrees recursively.

Wosi
  • 41,986
  • 17
  • 75
  • 82
  • Take a look here for a temporary workaround: http://stackoverflow.com/questions/39862043/ordner-nicht-angegeben-with-omnipascal-in-vscode – Wosi Oct 10 '16 at 13:21
  • 1
    @Wosi what's the state of Linux support now? I've installed your extension under Linux and pointed the configuration to my Freepascal source files. When I now type in some standard pascal commands it seems that code completion works... Or am I wrong? Do you have a more-in-detail overview how to work with your plugin? It would be nice to add the Lazarus sources, too. Thanks in advance! – Marc Nov 08 '16 at 08:38
  • @Marc It's still running on Windows only. When (almost) all of Delphi's language features are supported it will be extended to other platforms and editors. – Wosi Nov 09 '16 at 10:28
  • Since some people were confused by the comments: OmniPascal is now working on Mac and Linux as well. – Wosi Aug 30 '17 at 08:18