mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-05-28 16:34:10 +02:00
Add comment to YAML
This commit is contained in:
parent
063d3949cf
commit
77cef909fb
@ -23,6 +23,12 @@ import org.yaml.snakeyaml.DumperOptions
|
|||||||
import org.yaml.snakeyaml.Yaml
|
import org.yaml.snakeyaml.Yaml
|
||||||
|
|
||||||
class VimscriptFunctionProcessor(private val environment: SymbolProcessorEnvironment) : SymbolProcessor {
|
class VimscriptFunctionProcessor(private val environment: SymbolProcessorEnvironment) : SymbolProcessor {
|
||||||
|
companion object {
|
||||||
|
const val comment = """# This file was automatically generated by [com.intellij.vim.processor.VimscriptFunctionProcessor].
|
||||||
|
# If you are going to change it, you are probably doing something wrong, as your changes will be overridden by the next `gradle kspKotlin` run.
|
||||||
|
|
||||||
|
"""
|
||||||
|
}
|
||||||
private val visitor = VimscriptFunctionVisitor()
|
private val visitor = VimscriptFunctionVisitor()
|
||||||
private val writer = FileWriter()
|
private val writer = FileWriter()
|
||||||
private val nameToFunction = mutableMapOf<String, KSClassDeclaration>()
|
private val nameToFunction = mutableMapOf<String, KSClassDeclaration>()
|
||||||
@ -41,7 +47,7 @@ class VimscriptFunctionProcessor(private val environment: SymbolProcessorEnviron
|
|||||||
val dictToWrite: Map<String, String> = nameToFunction
|
val dictToWrite: Map<String, String> = nameToFunction
|
||||||
.map { it.key to it.value.qualifiedName!!.asString() }
|
.map { it.key to it.value.qualifiedName!!.asString() }
|
||||||
.toMap()
|
.toMap()
|
||||||
return yaml.dump(dictToWrite)
|
return comment + yaml.dump(dictToWrite)
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo inspection that annotation is properly used on proper classes
|
// todo inspection that annotation is properly used on proper classes
|
||||||
|
Loading…
Reference in New Issue
Block a user