Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support F# language? #186

Closed
bentayloruk opened this issue Nov 4, 2018 · 22 comments
Closed

Support F# language? #186

bentayloruk opened this issue Nov 4, 2018 · 22 comments
Labels

Comments

@bentayloruk
Copy link

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

image

NOTE: If you are reporting a performance issue, please comment your hardware env like this:

@nojaf
Copy link

nojaf commented Nov 20, 2018

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?

@auduchinok
Copy link

@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.

@izhangzhihao
Copy link
Owner

izhangzhihao commented Nov 25, 2018

I just created a new issue: RIDER-21994. Please follow and vote for this issue on youtrack.

@izhangzhihao izhangzhihao added the waiting for JetBrains this feature/issue depends on JetBrains label Nov 25, 2018
@drhumlen
Copy link

drhumlen commented Apr 30, 2019

@auduchinok @izhangzhihao What is the status per now? Is it possible to implement now?

Edit: If not, do you have any ETA?

@auduchinok
Copy link

auduchinok commented Apr 30, 2019

@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.

@pnobre
Copy link

pnobre commented Jun 11, 2019

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

@intellij-rainbow-brackets

This comment has been minimized.

@auduchinok
Copy link

auduchinok commented Jun 13, 2019

@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).

@pnobre
Copy link

pnobre commented Jun 13, 2019

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.

@g5becks
Copy link

g5becks commented Sep 13, 2019

any updates on this?

@izhangzhihao izhangzhihao added the language specific this feature/issue only effect on specific languages label Jan 27, 2020
@drhumlen
Copy link

drhumlen commented Mar 9, 2020

Any updates? @auduchinok?

@izhangzhihao
Copy link
Owner

It's there anything I could do?

@drhumlen
Copy link

drhumlen commented Apr 5, 2020

@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
Copy link

auduchinok commented Apr 6, 2020

@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.

@izhangzhihao izhangzhihao added Rider specific Features/bugs about the Rider IDE and removed language specific this feature/issue only effect on specific languages labels Aug 21, 2020
@thomasd3
Copy link

thomasd3 commented Sep 5, 2020

is it still something planned someday? I would love it!

@drhumlen
Copy link

@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"? 😅

@auduchinok
Copy link

@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#.

@github-actions

This comment has been minimized.

@izhangzhihao
Copy link
Owner

@auduchinok It's there any potential plans or progress?

@cmeeren
Copy link

cmeeren commented May 10, 2022

Just came across this plugin and would love for it to support F#.

@lucasteles
Copy link

+1 for this :)

@izhangzhihao izhangzhihao added In the next release and removed waiting for JetBrains this feature/issue depends on JetBrains labels May 16, 2023
@izhangzhihao
Copy link
Owner

izhangzhihao commented May 16, 2023

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:

image

With the rainbow variables option enabled:

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests