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

feat: catppuccin vscode-icons #103

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ indent_style = tab
indent_size = 4

# python
[*.{ini,py,py.tpl,rst}]
[*.{ini,py,py.tpl,rst,kt,kts}]
indent_size = 4

# rust
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/main/resources/icons"]
path = src/main/resources/icons
url = https://github.com/catppuccin/vscode-icons.git
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ intellij {
changelog {
version.set(properties("pluginVersion"))
path.set(file("CHANGELOG.md").canonicalPath)
header.set(provider { "${version.get()} - ${date()}"})
header.set(provider { "${version.get()} - ${date()}" })
headerParserRegex.set("""(\d\.\d\.\d)""".toRegex())
itemPrefix.set("-")
keepUnreleasedSection.set(true)
Expand Down Expand Up @@ -68,7 +68,7 @@ tasks {

// Get the latest available change notes from the changelog file
changeNotes.set(provider {
changelog.renderItem(changelog.getLatest(), Changelog.OutputType.HTML)
changelog.renderItem(changelog.getLatest(), Changelog.OutputType.HTML)
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.github.catppuccin.jetbrains.icons

import com.intellij.ide.IconProvider
import com.intellij.psi.PsiElement
import com.intellij.psi.util.PsiUtilCore
import javax.swing.Icon

class CatppuccinIconProvider : IconProvider() {
override fun getIcon(element: PsiElement, flags: Int): Icon? {
var icon: Icon? = null
val virtualFile = PsiUtilCore.getVirtualFile(element)

if (virtualFile != null) {
val fileName = virtualFile.name
if (fileName.endsWith(".md")) {
icon = CatppuccinIcons.MARKDOWN_FILE;
}
}

return icon
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.github.catppuccin.jetbrains.icons

import javax.swing.Icon
import com.intellij.openapi.util.IconLoader

object CatppuccinIcons {
@JvmField
val MARKDOWN_FILE: Icon = IconLoader.getIcon("/icons/icons/markdown.svg", javaClass)
}
4 changes: 4 additions & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@ For further help, see also:
<bundledColorScheme path="/themes/frappe-no-italics"/>
<bundledColorScheme path="/themes/macchiato-no-italics"/>
<bundledColorScheme path="/themes/mocha-no-italics"/>

<iconProvider implementation="com.github.catppuccin.jetbrains.icons.CatppuccinIconProvider"
order="first"
id="CatppuccinIconProvider"/>
</extensions>
</idea-plugin>
1 change: 1 addition & 0 deletions src/main/resources/icons
Submodule icons added at 6fd54a
Loading