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

Matched brace setting reset #243

Closed
jgspratt opened this issue Aug 23, 2019 · 5 comments
Closed

Matched brace setting reset #243

jgspratt opened this issue Aug 23, 2019 · 5 comments

Comments

@jgspratt
Copy link

Your programming language(s)

Python, Terraform, Bash

Expected Behavior

Changing the Matched Brace setting under Editor > Color Scheme > General should be retained after restarting IntelliJ.

Current Behavior

The Matched brace setting is reset when Rainbow Brackets is enabled and IntelliJ is restarted. Disabling Rainbow Brackets fixes this issue (the setting is retained through restarts after disabling Rainbow Brackets).

Possible Solution

I tried 2019.1, 2019.1-jbr11, 2019.2, and 2019.2-jbr8. None of these fixed it.

I tried the other recommended solution posted here:

# cat  ~/Library/Preferences/IdeaIC2019.1/options/rainbow_brackets.xml
<application>
  <component name="RainbowSettings">
    <option name="customNotifyShowed" value="true" />
    <option name="overrideMatchedBraceAttributes" value="false"/>
    <option name="version" value="5.21" />
  </component>
</application>

Code snippet for reproduce (for bugs)

Any code will do:

print('hi')

Example setting that would not be retained for the Matched brace setting:

Background color: 000000
Effects: FFFFFF (Bold Underscored)

Your Environment

  • Plugin version: 5.21
IntelliJ IDEA 2019.1.4 (Community Edition)
Build #IC-191.8026.42, built on July 30, 2019
JRE: 11.0.2+9-b159.64 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
@jgspratt
Copy link
Author

The color did change after setting overrideMatchedBraceAttributes = false: it changed to a yellow foreground. However, I did not want to set the foreground color to yellow, and if I change the settings to what I want, they just change back to the yellow setting after restarting.

@izhangzhihao
Copy link
Owner

izhangzhihao commented Aug 23, 2019

Please try this snapshot:
intellij-rainbow-brackets-5.21.zip

@jgspratt
Copy link
Author

That fixed it.

@jgspratt
Copy link
Author

The new version did this when I relaoded a second time:

Plugin 'izhangzhihao.rainbow.brackets' failed to initialize and will be disabled.  Please restart IntelliJ IDEA.

java.lang.IllegalStateException: scheme.getAttributes(KEY…TRIBUTES).backgroundColor must not be null
    at com.github.izhangzhihao.rainbow.brackets.RainbowHighlighter.fixHighlighting(RainbowHighlighter.kt:163)
    at com.github.izhangzhihao.rainbow.brackets.RainbowHighlighter.fixHighlighting$default(RainbowHighlighter.kt:151)
    at com.github.izhangzhihao.rainbow.brackets.component.RainbowComponent.initComponent(RainbowComponent.kt:28)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:482)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:104)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$createComponents$9(ApplicationImpl.java:449)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:473)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:88)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:407)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:393)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:208)
    at com.intellij.idea.IdeaApplication.lambda$initApplication$0(IdeaApplication.java:74)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
    at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
    at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:349)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

@izhangzhihao
Copy link
Owner

Snapshot updated, please download and give a try.

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

No branches or pull requests

2 participants