-
Notifications
You must be signed in to change notification settings - Fork 228
Settings not taken into account #591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you test if it works in VSCode? Just to rule out that it's not an editor/client-specific issue. |
I am unfamiliar with VS Code but I installed it ( |
Then the language server may have trouble finding your dependencies. Try a vanilla Gradle or Maven project, if that works, try finding the differences to your project. |
Ah I just saw that the page for the extension mentions that it must be a Maven or Gradle project. I'm using Gradle, but I guess I must also install a Gradle extension for vscode? I'm installing the "Gradle for Java" extension |
In principle Kotlin should suffice |
I'll try with https://github.com/fwcd/kotlin-quick-start then Step 1: finding the right openjdk version for it. It does not seem to be openjdk-21:
EDIT: v17 seems to build. Step1 done. Step2: reproducing the Neovim: ✔️ Step3: reproducing the issue with VSCode ✔️ Step 4: changing the setting in VSCode ✔️ |
Changing the setting VSCode fixes the issue, so it would seem the issue is Neovim-specific. It would be great if there was a way for me to see what settings Neovim sends to kotlin-language-server. EDIT: here is what I get when I type
|
OK… I am stupid 🤦 require("mason-lspconfig").setup_handlers {
function (server_name) -- default handler (optional)
if server_name == "kotlin_language_server" then
require("lspconfig")["kotlin_language_server"].setup {
on_attach=custom_lsp_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities(),
settings = {
kotlin = {
compiler = {
jvm = {
target = "11"
}
}
}
}
}
+ return
end
require("lspconfig")[server_name].setup {
on_attach=custom_lsp_attach,
capabilities = require('cmp_nvim_lsp').default_capabilities()
}
end,
} Thanks for your answers, and great work with this LSP! |
Glad to hear you fixed it! |
I can see this error on some lines:
Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option [INLINE_FROM_HIGHER_PLATFORM]
I've seen #72, so I tried to fix it like this:
That does not seem to have any effect. How do I troubleshoot this?
The text was updated successfully, but these errors were encountered: