Skip to content

Commit 8ed9ac2

Browse files
committed
feat(devins-lang): add icon for rule completion items
- Import AutoDevIcons to access rule icon - Add icon to rule completion items in the lookup list
1 parent ad7fc60 commit 8ed9ac2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/completion/provider/RuleCompletionProvider.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cc.unitmesh.devti.language.completion.provider
22

3+
import cc.unitmesh.devti.AutoDevIcons
34
import cc.unitmesh.devti.completion.AutoDevFileLookupElement
45
import cc.unitmesh.devti.sketch.rule.ProjectRule
56
import com.intellij.codeInsight.completion.CompletionParameters
@@ -30,6 +31,7 @@ class RuleCompletionProvider : CompletionProvider<CompletionParameters>() {
3031
val filename = virtualFile.nameWithoutExtension
3132

3233
val elementBuilder = LookupElementBuilder.create(filename)
34+
.withIcon(AutoDevIcons.RULE)
3335
.withInsertHandler { context, _ ->
3436
context.editor.caretModel.moveCaretRelatively(1, 1, false, false, false)
3537
}

0 commit comments

Comments
 (0)