Skip to content

Commit

Permalink
feat(devin-lang): add support for Markdown plugin integration and com…
Browse files Browse the repository at this point in the history
…pletion 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.
  • Loading branch information
phodal committed Mar 12, 2024
1 parent 1589eb1 commit 0a863f7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build.gradle.kts
Expand Up @@ -588,6 +588,15 @@ project(":exts:devin-lang") {
plugin("org.jetbrains.grammarkit")
}

intellij {
version.set(ideaVersion)
plugins.set((ideaPlugins + "org.intellij.plugins.markdown"))
}

dependencies {
implementation(project(":"))
}

tasks {
generateLexer {
sourceFile.set(file("src/grammar/DevInLexer.flex"))
Expand Down
@@ -0,0 +1,16 @@
package cc.unitmesh.language.completion

import com.intellij.codeInsight.completion.CompletionParameters
import com.intellij.codeInsight.completion.CompletionProvider
import com.intellij.codeInsight.completion.CompletionResultSet
import com.intellij.util.ProcessingContext

class CodeLanguageProvider: CompletionProvider<CompletionParameters>() {
override fun addCompletions(
parameters: CompletionParameters,
context: ProcessingContext,
result: CompletionResultSet,
) {
TODO("Not yet implemented")
}
}
4 changes: 4 additions & 0 deletions exts/devin-lang/src/main/resources/cc.unitmesh.language.xml
@@ -1,4 +1,8 @@
<idea-plugin package="cc.unitmesh.language">
<dependencies>
<plugin id="org.intellij.plugins.markdown"/>
</dependencies>

<extensions defaultExtensionNs="com.intellij">
<!-- refs: https://github.com/JetBrains/intellij-sdk-code-samples/blob/main/simple_language_plugin/src/main/resources/META-INF/plugin.xml-->
<fileType name="DevInFile" implementationClass="cc.unitmesh.language.DevInFileType" fieldName="INSTANCE"
Expand Down

0 comments on commit 0a863f7

Please sign in to comment.