https://kotlinlang.org logo
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
  • d

    Dmitriy Malayev

    09/15/2022, 7:50 AM
    Any tips on making a header and footer with Kotlin and IntelliJ
    s
    a
    g
    • 4
    • 4
  • l

    Laurent Laborde

    09/15/2022, 9:20 AM
    i would like to have a config.yml for my kotlin/jvm console application, it’s a gradle project. should i put it in the resources folder ?
  • p

    Peter

    09/15/2022, 1:56 PM
    Installed today new version of IDEA: IntelliJ IDEA 2022.2.2 (Ultimate Edition) Build #IU-222.4167.29, built on September 13, 2022 And since then I get a lot of warnings that IDEA is accessing all kind of directories and locations on my computer (Downloads, Networks, ….). This is on MacOS, so that is why I get warnings since I didn’t give access rights to those directories before to IDEA and also never was asked for it. What is the reason IDEA suddenly scans many parts of my computer, assuming it is IDEA that is causing this behaviour and not a plugin that just at same time happen to be upgraded ?
    l
    • 2
    • 2
  • d

    Dmitry Kandalov

    09/26/2022, 12:03 PM
    What is the easiest way to downgrade Kotlin plugin? I can’t see 222-1.7.10-release-334-IJ4167.29 or any alternative version here https://plugins.jetbrains.com/plugin/6954-kotlin/versions
    m
    • 2
    • 2
  • m

    mbonnin

    09/27/2022, 10:02 AM
    Alright, deleted my
    .idea
    and
    .gradle
    and it's all back to one single tab and one single operation
  • m

    Michael de Kaste

    09/29/2022, 1:10 PM
    when changing the signature of a variable, the result will be an
    internal val myvariable: MyType
    this breaks my code because internal visibility modifier wasn't initially there. I can't change this either I believe, or is there a setting I missed?
    w
    j
    • 3
    • 6
  • m

    mbonnin

    10/04/2022, 2:38 PM
    I'm ashamed to ask at this point but how do you typically exclude your
    build
    folders from search results? I've browsed a bunch of stack overflow answers and the easiest way seems to be to add
    build
    to the list of ignored folders. But this has a number of drawbacks like the fact that it seems to be a global and also more importantly removes
    build
    from the project explorer completely so it's not possible to go in generated files for an example. How do you do this?
    w
    s
    • 3
    • 5
  • w

    wasyl

    10/05/2022, 10:36 AM
    default
    is a java keyword, I suppose that’s why you can’t use it in package name
    s
    j
    +2
    • 5
    • 10
  • p

    Paul Griffith

    10/06/2022, 4:54 PM
    Anyone know if there’s any documentation for the way the toolbox app listens on local ports? I can reverse engineer something, but a spec would be nice
    • 1
    • 1
  • m

    mbonnin

    10/07/2022, 12:44 PM
    How supported is it to downgrade the IDEA version used to open a given project? If I opened a project with 2022.3, is it ok to open it with 2022.2 without re-importing the project? In other terms, is the
    .idea
    binary format forward compatible? 😅
    j
    j
    • 3
    • 8
  • w

    wasyl

    10/07/2022, 1:52 PM
    Is there any way to fix this (turn highlighting back on) without restarting the IDE (which for some reason reindexes tons of libraries)? This pops up pretty randomly and doesn’t go away even if the file is 100% correct 😕
    c
    a
    • 3
    • 8
  • h

    hfhbd

    10/08/2022, 1:31 PM
    How can you change the auto insert of
    trimIndent()
    to
    trimMargin()
    ?
    b
    • 2
    • 2
  • j

    Javier

    10/13/2022, 2:56 PM
    Has anyone this issue on latest EAP?
    Cannot open Local Terminal
    Failed to start [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe]
    
    Error starting winpty: agent executable does not exist: ...\winpty-agent.exe
    • 1
    • 1
  • w

    wasyl

    10/17/2022, 3:03 PM
    Is there a way to use both
    CamelHumps
    words but fall back to default, non-camel-humps behavior as needed? My use case is that I often use multi-cursor to select stuff, and would like to be able to select e.g. all fields here:
    class Foo(
      val <|>id: String,
      val <|>someComplexProp: Int,
      val <|>otherProp: Unit,
    )
    with cursors at
    <|>
    I can’t find an easy way to select all the properties. Sometimes
    extend selection
    works as it’ll select single word first and whole identifier second, but that doesn’t work with identifiers that are just one word (like
    id
    here).
    s
    r
    • 3
    • 11
  • d

    David Hu

    10/19/2022, 5:42 PM
    I am trying the experimental
    ..<
    operator in IntelliJ and I have already added the opt in via
    @OptIn(ExperimentalStdlibApi::class)
    but IntelliJ still produces this error:
    The feature "range until operator" is only available since language version 1.8
    how do I resolve it?
    e
    • 2
    • 3
  • p

    Peter

    10/21/2022, 8:02 AM
    In the latest version of IDEA (IntelliJ IDEA 2022.2.3 (Ultimate Edition)) a full screen IDE window turns completely black after inactivity/sleep. And only if I un-maximise this window, the content is drawn again. This in on a macbook pro with M1 processor. Anyone else seen this behaviour?
    m
    • 2
    • 1
  • h

    hfhbd

    10/21/2022, 7:17 PM
    Do you know an option to refresh the diff viewer after running tests again? At the moment, I have to open and close the diff view manually after each run.
  • a

    andylamax

    10/22/2022, 1:03 AM
    How do I disable * imports in my IDE upon code formatting or code completion?
    b
    • 2
    • 2
  • r

    ritesh

    10/23/2022, 9:50 AM
    Any resources for learning PSI (Program Structure Interface) generated by the Intellij. I couln't find any detailed documentation on it.
    m
    • 2
    • 1
  • j

    Jan

    10/24/2022, 6:09 PM
    somehow this doesnt seem right? Why is the jetbrains folder taking 34GB of storage?
    c
    a
    • 3
    • 2
  • z

    zero_coding

    10/27/2022, 11:40 AM
    https://stackoverflow.com/questions/74221460/trigger-gradlew-test-when-files-have-changed
  • a

    Anouar di Kali

    11/01/2022, 10:49 PM
    hi , when I try to add a new module to my project , I see that kotlin is missing from language list . is this a bug ? I have IntelliJ IDEA 2022.2.3 (Community Edition) Build #IC-222.4345.14 and kotlin plugin 222-1.7.20-release-201-IJ4167.29 screenshot
    c
    a
    • 3
    • 3
  • a

    Alex Styl

    11/03/2022, 7:52 AM
    How can I make intellij close the currently visible tab by CMD+W? It does it by default, but I must have pressed some keyboard shortcut and now I need to focus on each tab each time and then press CMD+W again to close it.
    • 1
    • 1
  • k

    Kristian Nedrevold

    11/06/2022, 6:35 PM
    Working with a ktor project in Intellij, added dependencies for cassandra from datastax and the CPU usage of intellij is permanently at max
    a
    • 2
    • 1
  • k

    Klitos Kyriacou

    11/08/2022, 6:46 PM
    Whenever a have a blank string literal in my code, as in
    val x = ""
    , it's underlined and on hovering it says "Ctrl+click to navigate in remote FS view". What is remote FS view?If I don't use it, how can I get rid of this distracting underline?
    m
    m
    • 3
    • 4
  • a

    Adam Brown

    11/15/2022, 9:30 PM
    I want to change the modifier key that I hold for the "CTRL + Mouse Hover" action, i dont know what to call that exactly even, so its hard to search in settings for the action. Any idea what the action is called?
    s
    • 2
    • 2
  • m

    mzgreen

    11/22/2022, 7:40 PM
    Why this:
    class Foo
    
    fun Foo.test() {
        println("hello")
    }
    
    val x = Foo::test
    
    x(Foo())
    doesn’t work in an IntelliJ/AndroidStudio Kotlin scratch file? It shows: “‘test’ is a member and an extension at the same time. References to such elements are not allowed” error. But it works in Kotlin playground: https://pl.kotl.in/ubsrNwrCx ? Is this a bug?
    e
    e
    • 3
    • 6
  • d

    Davio

    11/23/2022, 9:31 AM
    I have a weird construction for which IntelliJ complains:
    class Test {
        suspend fun test1() = test3<String>(::test2)
        suspend fun test2() = withContext(<http://Dispatchers.IO|Dispatchers.IO>) { }
    
        private suspend inline fun <reified T> test3(block: suspend () -> Unit): List<T> {
            block.invoke()
            return listOf()
        }
    }
    IntelliJ suggests that I can remove the suspend keyword from the lambda parameter of test3, but if I remove it, it no longer compiles. The reason IntelliJ gives is
    Redundant 'suspend' modifier: lambda parameters of suspend function type uses existing continuation.
    Is this an error in IntelliJ or the compiler?
    s
    s
    • 3
    • 5
  • n

    nerses

    11/23/2022, 12:12 PM
    its so frustrating that you can’t see sources of kotlin std library for most of the classes/funs, i.e. Map.mapNotNull
    r
    s
    m
    • 4
    • 10
  • w

    wasyl

    11/28/2022, 11:11 AM
    IntelliJ shows deprecated classes with strikethrough in the
    go to class
    dialog. Is it possible to have a structural search inspection also apply this behavior in the
    go to class
    dialog? Essentially I’d like a
    @MyDeprecated
    class with structural search-based inspection, and I’d like classes annotated with it to be shown with strikethrough in the
    go to class
    window as well
Powered by Linen
Title
w

wasyl

11/28/2022, 11:11 AM
IntelliJ shows deprecated classes with strikethrough in the
go to class
dialog. Is it possible to have a structural search inspection also apply this behavior in the
go to class
dialog? Essentially I’d like a
@MyDeprecated
class with structural search-based inspection, and I’d like classes annotated with it to be shown with strikethrough in the
go to class
window as well
View count: 29