Skip to content

Commit 2d8d1f1

Browse files
committed
feat(devins-lang): add support for line info in commands and improve symbol resolution formatting
This commit introduces support for highlighting line info in DevInS commands and refactors the symbol resolution format to include class, method, field, and constructor information.
1 parent 72efaef commit 2d8d1f1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

exts/devins-lang/src/main/kotlin/cc/unitmesh/devti/language/highlight/DevInSyntaxHighlighter.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class DevInSyntaxHighlighter : SyntaxHighlighter {
3232
ATTRIBUTES[DevInTypes.COMMAND_ID] = DefaultLanguageHighlighterColors.KEYWORD
3333
ATTRIBUTES[DevInTypes.COMMAND_PROP] = DefaultLanguageHighlighterColors.STRING
3434

35+
ATTRIBUTES[DevInTypes.SHARP] = DefaultLanguageHighlighterColors.CONSTANT
3536
ATTRIBUTES[DevInTypes.LINE_INFO] = DefaultLanguageHighlighterColors.NUMBER
3637

3738
ATTRIBUTES[DevInTypes.CODE_BLOCK_START] = DefaultLanguageHighlighterColors.KEYWORD

src/main/kotlin/cc/unitmesh/devti/provider/devins/DevInsSymbolProvider.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ interface DevInsSymbolProvider {
3131
* - If the parent is Package, the children will be classes
3232
* - If the parent is Class, the children will be methods and fields
3333
*
34-
* Format: `java.lang.String#length`, means: `<package>.<class>#<method>`
34+
* Format: `java.lang.String#length`, means:
35+
* - `<package>.<class>#<method>`
36+
* - `<package>.<class>#<field>`
37+
* - `<package>.<class>#<constructor>`
38+
*
3539
*/
3640
fun resolveSymbol(project: Project, symbol: String): List<String>
3741

0 commit comments

Comments
 (0)