fwcd / fwcd/kotlin-language-server

Unresolved reference when using Kotlin source files with a standalone compiler (kotlinc)

Open
#409 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
2k
Forks
252
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm trying to use this extension with a simple, standalone Kotlin source file. The file looks like this:

```
fun main() {
println("Hello, world!")
}
```

With this, I get an `Unresolved reference: printlnkotlin(UNRESOLVED_REFERENCE)`.

I have found some past issues that look similar:
https://github.com/fwcd/kotlin-language-server/issues/73
https://github.com/fwcd/kotlin-language-server/issues/58

But I'm still not sure what I should do to make this work. Is there some kind of setting I need to change in order to work with standalone files?

I also saw that one issue mentioned something akin to a default Gradle directory or something, but, somehow, I can't find that issue anymore. Anyway, assuming that I have a completely fresh setup that has never touched a Gradle project, can I somehow make this work?

I have an installation of Android Studio, if that makes any difference. I have added the `kotlinc` and `Java` included with my Android Studio installation to my path, which enables me to compile my example file from the command line.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.