izhangzhihao / intellij-rainbow-brackets

🌈Rainbow Brackets for IntelliJ based IDEs/Android Studio/HUAWEI DevEco Studio/Fleet
https://plugins.jetbrains.com/plugin/10080-rainbow-brackets
GNU General Public License v3.0
4.47k stars 214 forks source link

Better Indent guides for Python #2583

Closed JakubKahovec closed 1 year ago

JakubKahovec commented 1 year ago

Your issue may already be reported! Please search on the issues and the document before creating one.

Please check

Your programming languages

Python

Expected Behavior

I would expect indent guides to appear in the nested blocks

Current Behavior

Indent guides do not appear in the nested blocks. They appear though sometimes in certain blocks.

Screenshot 2023-01-19 at 10 04 18 Screenshot 2023-01-19 at 10 15 48

Possible Solution

Not obligatory, but suggest a fix/reason for the bug, or ideas how to implement the addition or change. Or what have you tried to resolve this issue.

Code snippet for reproduce (for bugs)

Please provide code snippet for reproduce bugs.

try:
    if cond:
        print("test")
        print("test")
        if another_cond:
            print("test")
            print("tst")
            for i in []:
                print(i)
                print(i)
    else:
        print("test")
        print("aaaa")
except NameError as e:
    print(e)

Your Environment

IntelliJ IDEA 2022.3.1 (Ultimate Edition)
Build #IU-223.8214.52, built on December 20, 2022
Licensed to Cisco Systems, Inc / Jakub Kahovec
Subscription is active until May 7, 2023.
Runtime version: 17.0.5+1-b653.23 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.1
GC: G1 Young Generation, G1 Old Generation
Memory: 5120M
Cores: 10
Metal Rendering is ON
Registry:
    ide.images.show.chessboard=true

Non-Bundled Plugins:
    ski.chrzanow.foldableprojectview (1.1.4)
    me.lensvol.blackconnect (0.5.0)
    cn.jxzhang.plugin.json-formatter (1.4)
    lermitage.intellij.extratci (1.24.0)
    com.crunch42.openapi (1.46)
    mobi.hsz.idea.gitignore (4.4.4)
    zielu.gittoolbox (213.10.5)
    Pythonid (223.8214.52)
    com.koxudaxi.pydantic (0.3.17)
    com.leinardi.pycharm.mypy (0.14.0)
    com.leinardi.pycharm.pylint (0.14.0)
    ru.meanmail.plugin.requirements (2022.4.1)
    com.jetbrains.lang.ejs (223.7571.117)
    com.dmarcotte.handlebars (223.7571.117)
    izhangzhihao.rainbow.brackets (2023.1.1)

Kotlin: 223-1.7.21-release-272-IJ8214.52
open-collective-bot[bot] commented 1 year ago

Hey @JakubKahovec :wave:,

Thank you for opening an issue/feature request. We will get back to you as soon as we can.

Please consider support us by buying a license here or donating from OpenCollective https://opencollective.com/intellij-rainbow-brackets.

And we have a special plan for paid users, if you are a paid user, your issue or feature request will have a higher priority.

If you are creating a issue, please make sure you already read the latest change log here.

JakubKahovec commented 1 year ago
Screenshot 2023-01-19 at 10 19 12
JakubKahovec commented 1 year ago

I see, ok, thanks for the update.

izhangzhihao commented 1 year ago

For your first image, because Python does not have{}, so we could not find color cross lines, but only you did like image two, only then we know how to highlighting the indent guide lines.

JakubKahovec commented 1 year ago

Would it be possible to somehow colorize the colon and take it into account for the related guideline ?

Screenshot 2023-01-19 at 10 04 18 - colorized
izhangzhihao commented 1 year ago
image image image

This feature will be delivered in the next release, and this feature depends on "Rainbowify python keywords"

image
JakubKahovec commented 1 year ago

Hello,

Thanks for the update, I've tried to install the plugin but it says the plugin is explicitly marked as incompatible with the current version of the IDE (2022.3.2). I have a question regarding the Rainbowify Python keywords, is it possible to make the colors somehow similar to the palette of the IDE semantic highlighting as currently the colors are a bit too bright for me

Best regards Jakub

On Sun, 29 Jan 2023 at 08:33, 张志豪 @.***> wrote:

[image: image] https://user-images.githubusercontent.com/12044174/215311750-2fd3ee22-8d3d-45d6-b4d7-6fd7916f7909.png

[image: image] https://user-images.githubusercontent.com/12044174/215311763-e7f36cbe-f61d-4b87-9bca-6450c4d7e511.png

[image: image] https://user-images.githubusercontent.com/12044174/215311899-4300755b-8c18-4cb6-95aa-095ea71382d1.png

This feature will be delivered in the next release, and this feature depends on "Rainbowify python keywords", please try the build snapshot intellij-rainbow-brackets-2023.1.2.zip https://github.com/izhangzhihao/intellij-rainbow-brackets/files/10529270/intellij-rainbow-brackets-2023.1.2.zip and give me feedback!

[image: image] https://user-images.githubusercontent.com/12044174/215311819-1abfdae3-e332-4b08-a21c-14c0509d1023.png

— Reply to this email directly, view it on GitHub https://github.com/izhangzhihao/intellij-rainbow-brackets/issues/2583#issuecomment-1407587285, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAH6XQTVUELYGEX3R2FIN3WUYMNHANCNFSM6AAAAAAUACRMAQ . You are receiving this because you were mentioned.Message ID: @.***>

izhangzhihao commented 1 year ago

I don't know why because I could not build a compatible version now... I will try fix this later

JakubKahovec commented 1 year ago

The ident guides work now for the Python keywords, but stopped working on some brackets blocks.

Screenshot 2023-01-29 at 15 10 28
izhangzhihao commented 1 year ago

Hello, Thanks for the update, I've tried to install the plugin but it says the plugin is explicitly marked as incompatible with the current version of the IDE (2022.3.2). I have a question regarding the Rainbowify Python keywords, is it possible to make the colors somehow similar to the palette of the IDE semantic highlighting as currently the colors are a bit too bright for me Best regards Jakub

By the way, you can try to enable the random color generator or config your own color

image image
JakubKahovec commented 1 year ago

Are you going to fix the indent guides for bracket blocks ? (as mentioned in https://github.com/izhangzhihao/intellij-rainbow-brackets/issues/2583#issuecomment-1407674860)

izhangzhihao commented 1 year ago

Are you going to fix the indent guides for bracket blocks ? (as mentioned in https://github.com/izhangzhihao/intellij-rainbow-brackets/issues/2583#issuecomment-1407674860)

I will try it in next release