Skip to content

Commit 0a863f7

Browse files
committed
feat(devin-lang): add support for Markdown plugin integration and completion provider implementation. #101
This commit introduces support for the Markdown plugin by including it as a dependency in the plugin configuration. Additionally, it lays the foundation for a completion provider by implementing the `CodeLanguageProvider` class, which is a crucial component for providing context-aware code completion suggestions within the IDE. The completion provider is currently a work in progress, with the `TODO` comment indicating that further development is required to implement the actual completion logic.
1 parent 1589eb1 commit 0a863f7

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,15 @@ project(":exts:devin-lang") {
588588
plugin("org.jetbrains.grammarkit")
589589
}
590590

591+
intellij {
592+
version.set(ideaVersion)
593+
plugins.set((ideaPlugins + "org.intellij.plugins.markdown"))
594+
}
595+
596+
dependencies {
597+
implementation(project(":"))
598+
}
599+
591600
tasks {
592601
generateLexer {
593602
sourceFile.set(file("src/grammar/DevInLexer.flex"))
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package cc.unitmesh.language.completion
2+
3+
import com.intellij.codeInsight.completion.CompletionParameters
4+
import com.intellij.codeInsight.completion.CompletionProvider
5+
import com.intellij.codeInsight.completion.CompletionResultSet
6+
import com.intellij.util.ProcessingContext
7+
8+
class CodeLanguageProvider: CompletionProvider<CompletionParameters>() {
9+
override fun addCompletions(
10+
parameters: CompletionParameters,
11+
context: ProcessingContext,
12+
result: CompletionResultSet,
13+
) {
14+
TODO("Not yet implemented")
15+
}
16+
}

exts/devin-lang/src/main/resources/cc.unitmesh.language.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<idea-plugin package="cc.unitmesh.language">
2+
<dependencies>
3+
<plugin id="org.intellij.plugins.markdown"/>
4+
</dependencies>
5+
26
<extensions defaultExtensionNs="com.intellij">
37
<!-- refs: https://github.com/JetBrains/intellij-sdk-code-samples/blob/main/simple_language_plugin/src/main/resources/META-INF/plugin.xml-->
48
<fileType name="DevInFile" implementationClass="cc.unitmesh.language.DevInFileType" fieldName="INSTANCE"

0 commit comments

Comments
 (0)