File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/documentation Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
package cc.unitmesh.devti.language.documentation
2
2
3
3
import cc.unitmesh.devti.agent.configurable.loadAgentConfigs
4
+ import cc.unitmesh.devti.custom.compile.CustomVariable
4
5
import cc.unitmesh.devti.language.completion.BuiltinCommand
5
6
import cc.unitmesh.devti.language.psi.DevInTypes
6
7
import com.intellij.lang.documentation.AbstractDocumentationProvider
@@ -25,6 +26,9 @@ class DevInsDocumentationProvider : AbstractDocumentationProvider() {
25
26
DevInTypes .COMMAND_ID -> {
26
27
BuiltinCommand .all().find { it.commandName == element.text }?.description
27
28
}
29
+ DevInTypes .VARIABLE_ID -> {
30
+ CustomVariable .all().find { it.variable == element.text }?.description
31
+ }
28
32
29
33
else -> {
30
34
element.text
@@ -37,7 +41,5 @@ class DevInsDocumentationProvider : AbstractDocumentationProvider() {
37
41
file : PsiFile ,
38
42
contextElement : PsiElement ? ,
39
43
targetOffset : Int
40
- ): PsiElement ? {
41
- return contextElement ? : file.findElementAt(targetOffset)
42
- }
44
+ ): PsiElement ? = contextElement ? : file.findElementAt(targetOffset)
43
45
}
You can’t perform that action at this time.
0 commit comments