Closed getong closed 9 months ago
There is no specific Mac OS or Windows or Linux version, they all run on the java virtual machine.
lsp-inlay-hints-mode
? This is how lsp-mode actually present you inlay hints, so you NEED to turn it on. This is standard lsp-mode behaviour, so nothing peculiar we are doing with this language server.Works perfectly fine on Mac OS when I do it 😛
There is no specific Mac OS or Windows or Linux version, they all run on the java virtual machine.
- Do you have the latest version of kotlin-language-server from source? Releases don't happen that often due to @fwcd being very busy. (start taking sponsors @fwcd ! Maybe you can escape your job/studies and do open source full time! ❤️ ). I don't think inlay hints is included in any release yet. I would guess this is the issue, based upon your language server output above.
- Do you remember to turn on the
lsp-inlay-hints-mode
? This is how lsp-mode actually present you inlay hints, so you NEED to turn it on. This is standard lsp-mode behaviour, so nothing peculiar we are doing with this language server.Works perfectly fine on Mac OS when I do it 😛
Which openjdk version do you use ? I use openjdk@17.
And I compile error after gradle build
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':buildSrc'.
> Failed to calculate the value of task ':buildSrc:compileJava' property 'javaCompiler'.
> No matching toolchains found for requested specification: {languageVersion=11, vendor=any, implementation=vendor-specific} for MAC_OS on x86_64.
> No locally installed toolchains match and toolchain download repositories have not been configured.
* Try:
> Learn more about toolchain auto-detection at https://docs.gradle.org/8.4/userguide/toolchains.html#sec:auto_detection.
> Learn more about toolchain repositories at https://docs.gradle.org/8.4/userguide/toolchains.html#sub:download_repositories.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@7b7cb9d3 of type BuildFlowService.Parameters
> A problem occurred configuring project ':buildSrc'.
> Failed to calculate the value of task ':buildSrc:compileJava' property 'javaCompiler'.
> No matching toolchains found for requested specification: {languageVersion=11, vendor=any, implementation=vendor-specific} for MAC_OS on x86_64.
> No locally installed toolchains match and toolchain download repositories have not been configured.
* Try:
> Learn more about toolchain auto-detection at https://docs.gradle.org/8.4/userguide/toolchains.html#sec:auto_detection.
> Learn more about toolchain repositories at https://docs.gradle.org/8.4/userguide/toolchains.html#sub:download_repositories.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================
BUILD FAILED in 934ms
See Github Actions for build examples. The standard Java version here is Java 11, so for 17 you specify -PjavaVersion=17
. So to build the language server for Java 17 you can run ./gradlew :server:installDist -PjavaVersion=17
.
I install kotlin-language-server by using:
brew install kotlin-language-server
This command by default install openjdk@17, which might be the problem.
kotlin-language-server 1.3.7
kotlin code:
error msg:
the lsp-kotlin config:
I have check the flag has set:
I test the sample code with lsp and lsp-bridge, neither can enable inlayHint feature. Only test in macos, not sure linux or windows.