本文介绍了如何将OmniPascal安装到vscode中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio市场上的OmniPascal页面:

"objectpascal.delphiInstallationPath" = "C:\\Program Files (x86)\\Embarcadero\\Studio\\16.0",

除了那似乎是错误的;它抱怨说它不应该是 = (等于),而是 : (冒号):

Except that seems to be wrong; it complains that it shouldn't be an = (equals), but a : (colon):

我认为这是一个错字,应该是一个冒号:

I assume that's a typo, and it should be a colon:

页面上的示例路径为:

C:\\Program Files (x86)\\Embarcadero\\Studio\\16.0

但是动画安装会粘贴到通往子文件夹 source 的路径中:

But the animated installation pastes in a path leading to the subfolder source:

是哪个?我之所以只问是因为这两种方法似乎都无法提出建议:

Which is it? I only ask because neither path seems to enable suggestions:

推荐答案

哦,显然文档中有错误.此问题将在下一个版本中修复.谢谢.当然,它应该是一个冒号,因为它是JSON文件中的一个条目.

Oh, obviously there's an error in the documentation. This will be fixed with the next release. Thanks.Of course it should be a colon since it is an entry in a JSON file.

条目objectpascal.delphiInstallationPath应该指向Delphi的安装路径.是否定义source子目录都没有关系.该路径在内部用于递归查找Delphi单元.由于所有.pas文件都位于source文件夹中,因此当该条目看起来像这样时,查找会稍微快一些:

The entry objectpascal.delphiInstallationPath should point to the path where Delphi is installed. It doesn't matter whether you define the source subdirectory or not. The path is internally used to find Delphi units recursively. As all .pas files are located in the source folder the lookup is slightly faster when the entry looks like this:

"objectpascal.delphiInstallationPath": "C:\\Program Files (x86)\\Embarcadero\\Studio\\16.0\\Source"

免费的Pascal用户应指向FPC目录

示例:

"objectpascal.delphiInstallationPath": "C:\\lazarus\\fpc"

您的屏幕快照中突出显示的语法似乎来自另一个用于Visual Studio代码的Pascal插件.当.pas文件中的OmniPascal插件处于活动状态时,当前文件类型为"ObjectPascal".您会在微笑的反馈按钮旁边的右下角看到它:

The syntax highlighting in your screenshot seems to come from another Pascal plugin for Visual Studio Code. When the OmniPascal plugin is active in a .pas file then the current file type is "ObjectPascal". You see it in the bottom right corner next to the smiling feedback button:

当当前文件类型为"Pascal"或其他任何文件时,说明错误的插件处于活动状态.单击文件类型,然后将其更改为"ObjectPascal".现在,您应该获得代码完成,快速信息等.

When the current file type is "Pascal" or anything else then the wrong plugin is active. Click on the file type and change it to "ObjectPascal". Now you should get code completion, quick infos and more.

这篇关于如何将OmniPascal安装到vscode中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 14:06
查看更多