Closed CrystalSplitter closed 7 years ago
I've come across a bug in the indent/kotlin.vim file. The way it currently handles indentations does not account for C style/Javadoc comments like so:
indent/kotlin.vim
/** * Comment * Stuff */ fun doSomething(): Int { }
The problem:
When using the formatoptions r flag, Vim allows auto placement of comment blocks with a return line. For example, in normal Java, this will look like:
formatoptions
r
/**
Then pressing enter will give:
/** *
With the default configuration of the comments option in Vim. Kotlin's current indentation vim script ignores these settings, and places:
comments
This cannot be fixed unless the indentation script is modified. My current work around has been to remove the indentation script.
Thanks for the report, I think I've fixed it, please check!
Fixed! Thank you!
I've come across a bug in the
indent/kotlin.vim
file. The way it currently handles indentations does not account for C style/Javadoc comments like so:The problem:
When using the
formatoptions
r
flag, Vim allows auto placement of comment blocks with a return line. For example, in normal Java, this will look like:Then pressing enter will give:
With the default configuration of the
comments
option in Vim. Kotlin's current indentation vim script ignores these settings, and places:This cannot be fixed unless the indentation script is modified. My current work around has been to remove the indentation script.