-
Notifications
You must be signed in to change notification settings - Fork 219
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
Exception in LSP when hovering the beginning or ending curly braces of a class
, data class
or enum
: java.lang.UnsupportedOperationException: Should not be called
#600
Comments
Ok, so I'm using the following workaround now to suppress these annoying notifications I get in neovim when the LSP throws an exception: {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
routes = {
{
-- Disable annoying error from `kotlin_language_server`.
opts = { skip = true },
filter = {
event = "notify",
find = "^kotlin_language_server: %-32603: Internal error%.$",
},
},
},
},
}, This can be helpful for other people with the same issue/setup too. Feel free to close this issue, if the exception is too hard to track down and fix. I understand it is tedious to debug something like this with very little documentation on the kotlin compiler internals. |
This is fixed in this fork. |
Thank you @AlexandrosAlexiou ! For anyone interested in how to setup the forked repo: Clone and build the fork: git clone https://github.com/kotlin-community-tools/kotlin-language-server.git
cd kotlin-language-server
./gradlew :server:installDist nvim config: require("lspconfig").kotlin_language_server.setup({
cmd = {
os.getenv("HOME") .. "/.lsp/kotlin-language-server/server/build/install/server/bin/kotlin-language-server",
},
capabilities = capabilities,
}) |
Appreciate the efforts on maintaining an active fork, but please keep the issue open if it's not fixed here yet (and use downstream issues otherwise). |
I've cherry-picked kotlin-community-tools/kotlin-language-server@eadceb7 to #612, though this doesn't fix the issue and just prevents it from potentially crashing the language server |
Hi,
I'm using
kotlin-language-server
with neovim and https://github.com/neovim/nvim-lspconfig.Unfortunately, I always receive this annoying notification from the LSP in neovim, whenever I hover the beginning or ending curly braces of a
class
,data class
orenum
:kotlin_language_server: -32603: Internal error.
I checked the logs, and this exception thrown in the LSP seems to be the source of this notification:
Minimal sample code to reproduce:
Is there a way to work around this?
Thanks
I know, this is a duplicate of #599, but I think mine is more detailed.
The text was updated successfully, but these errors were encountered: