https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
intellij
  • s

    Scott White

    05/09/2019, 5:13 PM
    how do we get InteliJ/Gradle to recompile a Spring Boot app when debugging?
    s
    • 2
    • 2
  • e

    elect

    05/10/2019, 8:45 AM
    I see it's possible to have programmatically bold/italic/etc in the output console in Visual Studio.. is it anything similar possible in Idea?
    k
    • 2
    • 4
  • d

    david-wg2

    05/13/2019, 2:39 PM
    is there any way to get rid of the one that comes bundled with intellj?
    s
    • 2
    • 2
  • p

    poohbar

    05/13/2019, 7:05 PM
    My Maven+Java+Kotlin project is getting unbearably slow. Editing Java files is okay but editing Kotlin files is excruciating. Typing anything results in 5+ second freezes where not even the cursor blinks. Everything works correctly, just super slow. Any quick things I should check? Is there a way to debug IntelliJ performance?
    h
    m
    +2
    • 5
    • 15
  • a

    Andrew Gazelka

    05/14/2019, 2:46 PM
    any way to get intermediate types in a method chain? (i.e., this)
    s
    m
    +3
    • 6
    • 35
  • m

    Matej Drobnič

    05/15/2019, 7:39 AM
    Not sure if this is slightly off-topic or not (it is kinda-kotlin related), but I'm wondering why is not smart type completion used by default instead of normal "dumb" completion? Why do you have to press extra shift key instead of vice versa? What do I loose if I swap out bindings?
    c
    k
    o
    • 4
    • 10
  • e

    elect

    05/15/2019, 2:16 PM
    I have a module which I'd like to rename, Idea asks what to rename: module or directory. I want both
    d
    • 2
    • 1
  • a

    Andrew Gazelka

    05/16/2019, 9:33 AM
    is there a good way to debug inline? For example having an equivalent breakpoint to this but if the line were
    if(current == goall) return reconstructPath(cameFrom, current)
    s
    • 2
    • 5
  • k

    Kelvie

    05/20/2019, 10:58 PM
    is there a way to create a kotlin program without specifying a main class, but rather a main function
    s
    • 2
    • 12
  • g

    Guilherme Titschkoski

    05/21/2019, 1:34 PM
    is it possible to use Java Inspections like “Abstractions Issues”, ˜Class Metrics˜ within kotlin classes ?
    a
    • 2
    • 1
  • c

    Casey Brooks

    05/23/2019, 7:28 PM
    Is there a setting in IntelliJ to add
    .trimMargin()
    instead of
    .trimIndent()
    when creating multiline strings?
    ❤️ 1
    a
    • 2
    • 1
  • g

    gregorbg

    05/27/2019, 10:07 AM
    IntelliJ has always been struggling to automagically suggest imports for extension functions within objects. I understand that the consensus seems to be creating a top-level file (which also works for import detection) that contains ext functions. However, in certain contexts an extension function may still be declared within an object, and it's admittedly very annoying to handle manual imports for that. Is this a known issue (or worse, desired behaviour)?
    d
    r
    • 3
    • 3
  • g

    gavvvr

    05/28/2019, 7:52 AM
    Hi! Could you please explain if it is an Intellij bug which suggests to add
    final
    or I miss something?
    k
    a
    • 3
    • 5
  • a

    amadeu01

    05/28/2019, 6:00 PM
    hi guys, I'm trying to use Scratch file, but I don't know how to make "log", or "print" something. I notice that exist a
    Scratch output
    but it does not show any printed data
    n
    a
    • 3
    • 7
  • r

    Ryan Benasutti

    05/31/2019, 1:44 AM
    I've been running into performance problems with IntelliJ (maybe it's the Kotlin plugin, I wouldn't know how to tell the difference) when working with certain Kotlin code (complex generics and files with lots of methods seem to do the trick). How can I debug this enough so that I can open a bug report? Are there tools to profile IntelliJ?
    a
    • 2
    • 4
  • b

    basher

    05/31/2019, 10:07 PM
    Any tips for getting better autocomplete / IDE help when doing groovy gradle work?
    k
    m
    g
    • 4
    • 6
  • p

    Pierfrancesco Gulinelli

    06/03/2019, 8:41 AM
    Hi! I'm using Kotlin from 1 month but i'm not understand how to edit the auto generation code position: in Java, when i must override some methods, the IDE autogenerates these methods at the end of the file while in Kotlin ad the beginning; i would like to have same behaviour of Java for Kotlin files.
    a
    • 2
    • 2
  • l

    louiscad

    06/08/2019, 1:56 PM
    Hi, does anyone know how to fix that issue that prevents me from writing Kotlin? I find no solution and it's driving me crazy! I'm trying my luck here as none of the workarounds I found on the internet worked and many use IDEA here.
    d
    g
    a
    • 4
    • 14
  • s

    Simon Schubert

    06/08/2019, 3:00 PM
    Damn, somehow I broke my Intellij 2019.1.3 Community on macOS today. On every project(example: https://github.com/msink/kotlin-libui) I tried to compile it gives me errors like this:
    * Source files: control.kt, disposable.kt, base.kt, image.kt, paint.kt, text.kt, drawarea.kt, layouts.kt, libui.kt, table.kt, utils.kt, widgets.kt, window.kt
     * Compiler version info: Konan: 1.2.1 / Kotlin: 1.3.31
     * Output kind: LIBRARY
    
    e: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration Color
    Cause: Protocol message tag had invalid wire type.
    File being compiled at position: (11,5) in /Users/simon/projects/kotlin-libui/libui/src/nativeMain/kotlin/draw/base.kt
    The root cause was thrown at: InvalidProtocolBufferException.java:99
    The compiling worked fine before. Uninstalled Intellij, cleared the cradle cache and the following folders: ~/Library/Application Support/IntelliJIdea2019.1 ~/Library/Caches/IntelliJIdea2019.1 ~/Library/Preferences/IntelliJIdea2019.1 Does anyone have a clue what’s happening? Update: After deleting ~/.konan folder and gradle sync everything works again!! 🎉 😅
    • 1
    • 2
  • m

    Mike

    06/09/2019, 8:46 PM
    Turn off auto- import and only use the apply dependencies. Ensure you're using latest gradle, intellij and kotlin intellij plugin. No guarantee but if you aren't doing something above, your experience may improve. But this is why I still prefer groovy version, but I've also been working with gradle for years, so used to its syntax.
    m
    p
    • 3
    • 7
  • a

    Andrew Gazelka

    06/09/2019, 10:00 PM
    anyone here using IntelliJ on macOS Catalina?
    • 1
    • 5
  • e

    elect

    06/12/2019, 9:55 AM
    2019.2 eap here, and now the suggestion window is always shown as 1px line, if I expand it normally with the mouse I can see the listed suggestions, but at the very next try, it's 1 pixel height again
    a
    • 2
    • 2
  • p

    poohbar

    06/12/2019, 2:53 PM
    example:
    list
      .map {
        val xyz = "hello"
       // breakpoint here
       "hi"
      }
    at the breakpoint the Variables window only shows me
    this(receiver)
    but it does not show
    xyz
    a
    • 2
    • 1
  • a

    Allan Wang

    06/18/2019, 12:57 AM
    Is there any way to automatically insert the inferred type of a function through an ide command/keyboard shortcut? Eg if
    fun a(): Int
    Exists and I write
    fun b() = a() + 2
    I’d like to be able to automatically create
    fun b(): Int = a() + 2
    Currently I can view the inferred type but I still need to copy it myself, which isn’t easy with the pop up dialog
    s
    k
    • 3
    • 5
  • k

    karelpeeters

    06/18/2019, 1:41 PM
    How do you search for all usages of a class, even if a class isn't explicitly mentioned? For example:
    data class Test(val x: Int)
    fun foo() = Test(3)
    fun bar() {
        val test = foo()
        println(test)
    }
    Find usages of the Test class only yields the constructor call in
    foo
    , nothing about
    bar
    , even though it does obviously use it. I looked trough the find unsages settings, and there you can select a couple more things, eg "usages of functions" and "usages of properties", but that still does't cover my
    bar
    example. Is there a way to really find all usages?
    l
    m
    +2
    • 5
    • 7
  • a

    Andrew Gazelka

    06/19/2019, 3:39 AM
    not really related to Kotlin, but anyone here know if there is any way to search for methods with a certain return type?
    k
    k
    d
    • 4
    • 3
  • e

    elect

    06/19/2019, 5:32 PM
    the example shows a static variable, is it possible for a non-static variable of a very specific istance of a class? (cant test it right now in the wished project)
    m
    • 2
    • 2
  • g

    GauthierPLM

    06/20/2019, 5:08 AM
    I am quite surprised that IntelliJ’ built in samples does not use the best of Kotlin (for exemple Kotlin DSL for Gradle). Is there any update incoming? I think these samples are a good way for people to learn how to use Kotlin and its tools.
    a
    • 2
    • 3
  • e

    elect

    06/21/2019, 12:57 PM
    VS has a nice feature that whenever you are in debug and click on code, it makes appear a small play button to automatically run the execution till there
    a
    • 2
    • 3
  • m

    Matej Drobnič

    06/23/2019, 4:03 PM
    Any idea why IDEA would not completely recognize HttpClient (it is kind of recognized, but red)? I have created new multiplatform project from IDEA template and just added ktor-client-core dependency.
    s
    • 2
    • 3
Powered by Linen
Title
m

Matej Drobnič

06/23/2019, 4:03 PM
Any idea why IDEA would not completely recognize HttpClient (it is kind of recognized, but red)? I have created new multiplatform project from IDEA template and just added ktor-client-core dependency.
s

Shawn

06/23/2019, 4:13 PM
see this thread: https://kotlinlang.slack.com/archives/C0A974TJ9/p1559314779023600?thread_ts=1559314595.023300&cid=C0A974TJ9
m

Matej Drobnič

06/23/2019, 4:13 PM
oh, it's not error, just marked red
thanks for info
View count: 4