intellij-rainbow-brackets
intellij-rainbow-brackets copied to clipboard
Support F# language?
Your programming language
F#
Expected Behavior
It's not expected, but I'd love to see lovely rainbow brackets 😉
Current Behavior
I see dull, boring and white brackets everywhere 😢
Your Environment
Rider with F# support plugin.
JetBrains Rider 2018.2.3
Build #RD-182.4231.496, built on September 13, 2018
Licensed to Ben Taylor
Subscription is active until June 4, 2019
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14

NOTE: If you are reporting a performance issue, please comment your hardware env like this:
Could you give us some pointers where to start to add support for this? @auduchinok do you see any restrictions from F# plugin side why this can't work in it's current form?
@nojaf Yes, there's no real parse trees in IntelliJ process for F# files (files are being parsed by FCS in ReSharper process, but only dummy tree nodes in IntelliJ) and this plugin works using these trees. We'll have to implement some parsing in IntelliJ F# plugin for this plugin to work. We've recently implemented a pseudo C# parser in IntelliJ which seems to be sufficient for this plugin.
I just created a new issue: RIDER-21994. Please follow and vote for this issue on youtrack.
@auduchinok @izhangzhihao What is the status per now? Is it possible to implement now?
Edit: If not, do you have any ETA?
@drhumlen The status hasn't changed, sorry. We've been working on other things for this release. There was an unfinished PR adding a pseudo-parser for IntelliJ that could be enough for this plugin if merged. Unfortunately, the PR author wasn't going to finish it (due to other things he's been working on at the time), so someone else will have to work on it. If no one else steps to do it, I'll look at finishing it at some point but most likely not in 2019.2 timeframe.
Hi,
I'm trying to get this working, but I'm very, very, very rookie to intellij plugin development and can't seem to get this plugin to start a rider instance instead of intellij, in order to do some debugging and understand the code better. Managed to get some colors, but instead of boring white, I get boring yellow and green (actually green after a few blind changes to rainbow brackets plugin and installing it manually in rider). Is there an easy way to have the runIde task to start rider instead of intellij ?
Thanks
Hi, @pnobre try to change this line to Rider destribution. And correspondingly you need to upgrade those intellij plugins (or just ignore the compile error), and add the F# plugin if you are going to test the F# support. And there we also have some development notes from the F# plugin.
@izhangzhihao We don't publish the F# plugin to the marketplace and it's bundled to Rider and built against particular ReSharperHost version bundled there as well. Adding dependency for testing should work the other direction, though, by adding the IntelliJ rainbow brackets plugin to F# plugin dependencies.
F# has quite a few custom bracket types (e.g. [<
, {|
, <@
, <@@
) and hardcoding them all in this plugin doesn't seem right at first. We could add some logic looking for generic bracket matching implementations defined in the platform. There's a PairedBraceMatcher
interface that looks related, although I'm not sure if there's something better suited.
Nonetheless, this plugin already adds specific logic for some languages, so another language might be not that bad. The problem is it's harder to do it for F# as the plugin isn't published separately.
Another approach could be using an optional plugin dependency from F# plugin to this one and adding the custom logic in F# plugin (which doesn't sound good either but at least a possible way of doing things).
Yesterday I've managed to have RB running in rider, together with my changes in Rider and got to the same conclusion... I have already implemented a PairedBraceMatcher for F#, will try to make RB play nicely with it this evening when I get home.
any updates on this?
Any updates? @auduchinok?
It's there anything I could do?
@auduchinok : Is there any hope of this getting support?
Would it be possible to implement a language neutral bracket matching? It really shouldn't require a special implementation for each individual programming language. Why is this even necessary (on the Jetbrains' ecosystem?)?. Matching one parenthesis with another should be straightforward independent of language? 🤔
@auduchinok : Is there any hope of this getting support?
Yes.
Why is this even necessary (on the Jetbrains' ecosystem?)?. Matching one parenthesis with another should be straightforward independent of language? 🤔
This is due to Intellij rainbow brackets using IntelliJ language support and Rider delegates quite a lot of the things to R# backend. The most of F# support is implemented in a R# plugin (we do have matching parens support there but it cannot be reused here) and we'll need to implement a simplified support in IntelliJ which could be enough for Intellij rainbow brackets to work. Even though it's not that hard, it should be done thoughtfully, so it actually works in plugins like this one, and carefully, so performance doesn't suffer on bigger files.
Unlike C# where we mostly need to integrate existing R# support into IntelliJ, for F# we still need to implement many of the missing parts on R# side and some are not even observed until used in various features later. Since the limited IntelliJ support is only needed in a few features it's not been a high-priority task, sorry.
is it still something planned someday? I would love it!
@auduchinok : R#? I can't find that language at all through google. Is it a custom made language specifically for Rider? ("Rider#"). Or is it the language R – but that doesn't make any sense?
Is there any hope for plugins like these? There seems to be a lot of plugins that doesn't work with Rider: Code with me, Projec tree color hightlighter, rainbow indent, rainbow bracket matching (obviously), etc. Why is Rider is so special, and is there any plans for making it "less special"? 😅
@drhumlen Yes, it's a ReSharper plugin that currently is made specifically for Rider (and uses some Rider-specific components), please see: https://github.com/JetBrains/fsharp-support#f-language-support-in-jetbrains-rider.
Is there any hope for plugins like these?
Yes, we're really hoping to get it working for F# soon. Many of the plugins you mention work for C# in Rider, since it has some needed things implemented that we don't yet have for F#.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days
@auduchinok It's there any potential plans or progress?
Just came across this plugin and would love for it to support F#.
+1 for this :)
Hi, since Rider 2023.2 EAP, a dummy F# parser has been added to the IDE, now this plugin can start supporting the F# lang.
Please download the Rider 2023.2 EAP from here or your JetBrains Toolbox.
After Rider 2023.2 EAP is installed, please download and try this build snapshot.
NOTE: F# support is a paid feature, if you don't have a license yet, you can start a 30 days free trial.
Please check other paid features here.
With rainbow brackets enabled:
With the rainbow variables option enabled: