stop paragraph wrapping also when syntax changes
maverickwoo opened this issue · 5 comments
At present the plugin detects the end of a paragraph by an empty line. However, in Go, the documentation of a declaration (type, func, etc.) must precede the declaration with no empty line in-between for the documentation tool to work properly. So, given this input and assuming the cursor is in the comment:
// Hello prints hello world.
func Hello() {
fmt.Println("hello world")
}
It will be wrapped as one paragraph into:
// Hello prints hello world. func Hello() { fmt.Println("hello world") }
Would it be possible to stop a paragraph when the syntax changes? This will avoid taking the code with it. Thank you!
Tested on: CLion 2017.1.1
I've always wanted to do this, but I've never spent the time to dig deep enough into the editor code to figure out how. I'll see what I can do!
This is exactly what I am looking for to. In fact I am using Go as well and this is an issue. Thanks.
The funny thing is, it detects paragraph breaks within comments, even if the "empty" line contains a comment character, but it doesn't detect the beginning or end of the comment itself.
Should be fixed in 1.7.0, now published to the Plugins Marketplace.
Thanks, this is a great improvement.