Hi,
This is really cool, thank you!
I’ve seen your discussion on your first attempt and that was apparently stalled because of third party dependency.
Now that there no third party dependency this can be included into the default installation.
I was just curious if there are reasons why you don’t want that to happen?
I am asking because I haven’t found an issue on GitHub about including this and I was going to create one, but thought it would be better to ask you first.
The bitbucket account is a signup for my university. Github is just one more thing to learn and I have my plate full with things to learn at work and university at the moment. Dazed and confused is my constant state.
Honestly, happy with what I’ve got and discuss.kakoune for me is a team meetup. There is a license to steal (unlicense) on my repositories so bring a backpack.
Click on my root name to see all my kakoune stuff, not the node name due to bitbucket project login will be required.
I’ve been working on kakoune-java.kak and still working on it, you might find something to pinch in there as well.
Jump into it and do some good. Have fun yerlaser. Bye
It’s a community, thanks for helping build it. I got a kt script for you to word-wrap in kakoune editor. Build with kotlin-native or jar or what ever you like, it’s kotlin .
WordWrapRegex.kt
/**
* Word Wrap Regex is adapted from source:
* @author http://rosettacode.org/wiki/Word_wrap#Regex_Implementation
*/
object WordWrapRegex {
private fun String.wordwrap(n: Int): String {
return Regex("(.{1,$n})(?:\\s[^\\S\r\n]*|\\Z)")
.findAll(this)
.joinToString("\n")
{ it.value }
}
@JvmStatic fun main(args: Array<String>) {
val stdin = generateSequence(::readLine)
val string = stdin.joinToString()
val result = string.wordwrap(if (args.isEmpty()) 102 else args[0].toInt())
println(result)
}
}
map global user 'H' '| wordwrapregex 80<ret>' -docstring "wrap selected text to column 80"
map global user 'W' '| wordwrapregex 102<ret>' -docstring "wrap selected text to column 102"
map global user 'K' '| wordwrapregex 120<ret>' -docstring "wrap selected text to column 120"
Hi yerlaser, were getting there buddy.
clone or pull kotlin.kak again as I have fixed mawww’s issues 04 March 2021 and also removed those -override flags as well.
Hi Duncan,
Thanks. I saw some additional comments.
My colleague is on vacation, so my time will be very limited in the coming weeks, but once freed I’ll review that.
Best regards, Yerlan
Sorry for late reply.
I just uploaded the latest changes from your repo.
May I ask you a question?
I am playing around with Kotlin, for now with the language itself and liking it.
Soon, however, I would like to try JetPack Compose as well.
However, I am not finding any resource which explains how to compile JetPack Compose apps with command line tools only, i.e. without Android Studio.
If you come accross such a resource, I would greatly appreciate if you share the link.
Meanwhile, I had to resubmit the pull request.
There are some strange characters in the bitbucket repo, don’t know if it’s my Linux setup or BitBucket itself, but the characters went into the original pull request.
I removed those characters and another pull request here:
Great job, nothing to do but wait for the bosses feedback (@mawww) and hopeful sooner rather than later the wider community can enjoy a kotlin highlighter in kakoune. Yah! .
If your interested in building your knowledge on functional programming for ‘Kotlin’: I am working my way through the below book, its on my preferred list of reads for the topic.
The authors last and final outstanding task for this book is: ‘Appendix E: Type Classes’.
You can purchase the book with all the available chapters and come back for the last ‘Appendix E’ later for free. Also for free is the books Github repository for you to work and play with kotlin code examples from the authors (see the above book reference for details).
I have no affiliations with either Manning Publications or Github. Bye
Hi yerlaser,
I set up mawww’s pedantic branch (mpb) to make things easier in regards to latest #4112 feedback. Grab it on: git clone --branch mpb --depth 1 https://bitbucket.org/KJ_Duncan/kakoune-kotlin.kak.git
Mate can do this trick again for us as you know it best. I will copy and paste those changes back into mpb for the next go round.
Wow, I was about (somewhat reluctantly) to look into this myself, knowing that it would be difficult as hell to understand and correct somebody else’s code, but, here you go, as if you listen to me
Thanks a lot!
I’ll update the file and will let you know.
Regarding “pedantic”, he is the author and I understand he only wants good code to go in since he will mostly also maintain it.
Hey man, congratulations!
The commit was merged, so, hopefully, next version will have kotlin support built-in.
Let’s hope the bits that you’ve written will serve people!
By the way, if you want to maintain your copy on bitbucket, would be good if you copy the file from github. The only change is removal of kotlin_ prefix from lines already containing kotlin/ in the path. But, that will make futher contributions easier.