mirror of
https://github.com/chylex/IntelliJ-Rainbow-Brackets.git
synced 2025-05-10 18:34:05 +02:00
Add support for C++ in CLion Nova
This commit is contained in:
parent
0e379b3a45
commit
ad617451c7
clion
src/main
@ -3,7 +3,8 @@ intellij {
|
||||
|
||||
plugins.set(listOf(
|
||||
// Built-in
|
||||
"cidr-base-plugin"
|
||||
"cidr-base-plugin",
|
||||
//"org.jetbrains.plugins.clion.radler" // Only in 2024.1 or newer. Worked around by only including the .xml file, and taking the implementation from Rider.
|
||||
))
|
||||
}
|
||||
|
||||
|
10
clion/src/main/resources/META-INF/cpp-nova-brackets.xml
Normal file
10
clion/src/main/resources/META-INF/cpp-nova-brackets.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="com.chylex.coloredbrackets">
|
||||
<bracePairProvider language="C++"
|
||||
implementationClass="com.chylex.intellij.coloredbrackets.provider.CppBracePairProvider" />
|
||||
</extensions>
|
||||
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<highlightVisitor implementation="com.chylex.intellij.coloredbrackets.visitor.CppRainbowVisitor" />
|
||||
</extensions>
|
||||
</idea-plugin>
|
@ -69,12 +69,12 @@ object BracePairs {
|
||||
}
|
||||
}
|
||||
|
||||
language.displayName to braceMap
|
||||
language.id to braceMap
|
||||
}
|
||||
.toMap()
|
||||
}
|
||||
|
||||
fun getBracePairs(language: Language): MutableMap<String, MutableList<BracePair>>? = bracePairs.value[language.displayName]
|
||||
fun getBracePairs(language: Language): MutableMap<String, MutableList<BracePair>>? = bracePairs.value[language.id]
|
||||
|
||||
private fun getBraceTypeSetOf(language: Language): Set<IElementType> = getBracePairs(language)?.values?.flatten()?.map { listOf(it.leftBraceType, it.rightBraceType) }?.flatten()?.toSet() ?: emptySet()
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
<depends optional="true" config-file="JSX.xml">JavaScript</depends>
|
||||
<depends optional="true" config-file="dart-brackets.xml">Dart</depends>
|
||||
<depends optional="true" config-file="groovy-brackets.xml">org.intellij.groovy</depends>
|
||||
<!--<depends optional="true" config-file="csharp-annotator.xml">com.intellij.modules.rider</depends>-->
|
||||
<depends optional="true" config-file="cpp-nova-brackets.xml">org.jetbrains.plugins.clion.radler</depends>
|
||||
<depends optional="true" config-file="cpp-rider-brackets.xml">com.intellij.modules.rider</depends>
|
||||
<depends optional="true" config-file="csharp-brackets.xml">com.intellij.modules.rider</depends>
|
||||
<depends optional="true" config-file="intellij-haskell-annotator.xml">intellij.haskell</depends>
|
||||
|
Loading…
Reference in New Issue
Block a user