albertoventurini / graphdb-intellij-plugin

Graph database plugin for the IntelliJ Platform
https://plugins.jetbrains.com/plugin/20417-graph-database
Apache License 2.0
53 stars 15 forks source link

Support for neo4j cypher-shell `:param` or `=>` operator #88

Open s-drevs opened 11 months ago

s-drevs commented 11 months ago

We heavily use cypher-shell param which need to be at the start of a cypher file. The "normal" syntax is not supported by this plugin as it breaks the syntax highlight and formatting for the whole file.

Example to break syntax highlight and formatting:

:param {csvfile:"file:///sample.csv", property:1};

Would be nice if this plugin could support this type of syntax.

Screenshot where syntax highlight and formatting break because of param

If that's not possible - because it's probably a neo4j, cypher-shell only thing - would you please add a formatting rule for the arrow operator? The arrow operator consists of two characters that are handled independently which breaks the script each time we use format document.

Example:

// before format document
:param csvfile => "file:///sample.csv"
:param property => 1;

// after format document
:param csvfile = > "file:///sample.csv"
:param property = > 1;

Screenshot with syntax highlight and formatting

If it would stay as in the first example, the script will still work in cypher-shell and we get to use format document freely without fixing this one small thing each time and of course syntax highlighting.

Nonetheless - thanks for this great plugin!