For a list of changes in the newest version, please refer to the changelog.
目前只支持离线安装,安装包从release下载
- 本来想支持
cat
等内置的函数,但是和MacroExpr冲突了,不知道怎么解决 - 在实现参数提示时,由于最初的bnf有问题,直接用了offset实现相关功能,虽然能用,但是一点都不优雅(本着又不是不能用的原则,先暂时就这样了)
The plugin features extensive syntax highlighting. In addition renders identifiers differently based on the semantic information inferred from your code. For instance, variables in relations will use a italic font while instances of components will use an underscore effect.
As with all common language plugins for JetBrains IDEs, the syntax highlighting is fully customizable and can even be disabled entirely if you like to keep it plain.
The plugin keeps track of all identifiers and their corresponding declaration-sites, which enables a lot of advanced code editing goodies.
Want to jump to an identifier's definition? Just click it while pressing CTRL! As you can see in the following example, this also works in the reverse direction: CTRL-click a definition to see a list of its usages.
In addition, the plugin also supports most of the common reference-resolution related features found in Jetbrains IDEs which can be triggered by various keyboard shortcuts.
Not happy with your identifiers' names? Press SHIFT-F6 and rename it in no time!
Of course refactoring also works over multiple files, as well as for relations that within components.
Use the IDEs quick-definition keyboard shortcuts to view an identifiers definition, without jumping to a different code section.
Annotate your code with JavaDoc-style comments to provide documentation for relations, components and even preprocessor definitions.
The documentation for an identifier can be queried by the IDEs quick-documentation keyboard shortcut.
One of the features I love most about IDEs from JetBrains is their context-sensitive auto-completion. While typing, the IDE will show you a list of suggestions that might complete your current input. Wherever possible, it will only suggest completions that make sense semantically.
When filling in the parameters of a function or relation and unsure, press CTRL-P to see the signature of the relation.
In order to find bugs in the code before it is passed to Soufflé, the plugin will highlight potential errors.
For instance, undefined identifiers will be highlighted.
Missing parameters will be reported...
...as will be superfluous parameters.
Furthermore, the IDE will issue a warning when variables are used only once in a relation rule.
Admittedly, this feature is not quite mature yet, but the plugin also supports automatic code formatting. For instance, new lines will be correctly indented when defining rules for a relation.
Code formatting can also be triggered manually for a whole file.
The plugin supports all JetBrains IDEs (i.e. IntelliJ, PyCharm, WebStorm, etc.) and can be obtained via their built-in plugin manager.
Just search for Datalog Language Support
in the marketplace section of the plugin dialog.
The plugin is listed on the JetBrains plugin repo.