Comments (7)
I had the same JSON-related error when first trying this language server with neovim on Windows, and after a little debugging found that setting the init_options.storagePath property to a valid directory fixed it.
init_options = {
storagePath = util.path.join(vim.env.XDG_DATA_HOME, "nvim-data"),
},
'util' is require('lspconfig/util'), and the environment variable plus the 'nvim-data' segment references a location on my machine. After starting the language server in neovim, I can see that the file kls_database.db is created there and the fatal error is gone.
Using the default init_options by omitting this property from my lua configuration did not help.
from kotlin-language-server.
@SrDum using the default config for init_options
solves this for me, previously I was using init_options = {}
edit: linux machine + neovim 10 nightly
from kotlin-language-server.
The SLF4J warning is fine (maybe not fine, but expected 😄).
A delegate object is null, jsonrpc methods of 'public default org.eclipse.lsp4j.services.NotebookDocumentService org.eclipse.lsp4j.services.LanguageServer.getNotebookDocumentService()' are ignored
This is interesting. We don't provide this method, but the client shouldn't call it either since we don't advertise it in the server capabilities.
Internal error: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $
The JSON error confuses me. I'd wager a guess and say that it's generally some misconfiguration on the client-side.
from kotlin-language-server.
The SLF4J warning is fine (maybe not fine, but expected 😄).
A delegate object is null, jsonrpc methods of 'public default org.eclipse.lsp4j.services.NotebookDocumentService org.eclipse.lsp4j.services.LanguageServer.getNotebookDocumentService()' are ignored
This is interesting. We don't provide this method, but the client shouldn't call it either since we don't advertise it in the server capabilities.
Internal error: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at path $
The JSON error confuses me. I'd wager a guess and say that it's generally some misconfiguration on the client-side.
I don't doubt it. How would I go about troubleshooting this?
from kotlin-language-server.
Consult with the docs/maintainers of the language client you're using or try another client and see if the issues persist.
from kotlin-language-server.
Consult with the docs/maintainers of the language client you're using or try another client and see if the issues persist.
Alright, thank you.
from kotlin-language-server.
I'm getting some sort of JSON error too on a fresh install, I haven't been able to find out what's going on:
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/lsp.lua:1308: RPC[Error] code_name = InternalError, message = "Internal error." data = "java.util.concurrent.CompletionException: java.lang.ExceptionInInitializerError\n\tat java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)\n\tat java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)\n\tat java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: java.lang.ExceptionInInitializerError\n\tat org.javacs.kt.classpath.BackupClassPathResolverKt.findLocalArtifactDirUsingMaven(BackupClassPathResolver.kt:88)\n\tat org.javacs.kt.classpath.BackupClassPathResolverKt.findLocalArtifact(BackupClassPathResolver.kt:25)\n\tat org.javacs.kt.classpath.BackupClassPathResolverKt.findKotlinStdlib(BackupClassPathResolver.kt:21)\n\tat org.javacs.kt.classpath.WithStdlibResolverKt.wrapWithStdlib(WithStdlibResolver.kt:42)\n\tat org.javacs.kt.classpath.WithStdlibResolverKt.wrapWithStdlibEntries(WithStdlibResolver.kt:17)\n\tat org.javacs.kt.classpath.WithStdlibResolverKt.access$wrapWithStdlibEntries(WithStdlibResolver.kt:1)\n\tat org.javacs.kt.classpath.WithStdlibResolver.getClasspathOrEmpty(WithStdlibResolver.kt:9)\n\tat org.javacs.kt.classpath.FirstNonEmptyClassPathResolver.getClasspathOrEmpty(ClassPathResolver.kt:75)\n\tat org.javacs.kt.CompilerClassPath.refresh(CompilerClassPath.kt:57)\n\tat org.javacs.kt.CompilerClassPath.refresh$default(CompilerClassPath.kt:47)\n\tat org.javacs.kt.CompilerClassPath.addWorkspaceRoot(CompilerClassPath.kt:120)\n\tat org.javacs.kt.KotlinLanguageServer$initialize$1.invoke(KotlinLanguageServer.kt:129)\n\tat org.javacs.kt.KotlinLanguageServer$initialize$1.invoke(KotlinLanguageServer.kt:74)\n\tat org.javacs.kt.util.AsyncExecutor.compute$lambda$2(AsyncExecutor.kt:19)\n\t... 4 more\nCaused by: org.javacs.kt.util.KotlinLSException: No repositories found at $MAVEN_REPOSITORY, $MAVEN_HOME, $M2_HOME or $HOME/.m2\n\tat org.javacs.kt.classpath.HomeKt.<clinit>(Home.kt:22)\n\t... 18 more\n"
stack traceback:
[C]: in function 'assert'
/usr/share/nvim/runtime/lua/vim/lsp.lua:1308: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
from kotlin-language-server.
Related Issues (20)
- Crash on windows
- Automatically generate "thank you" message for all contributors in release script
- Dependency module <dependencies of main> was not initialized by the time contents of dependent module <dependencies of main> were queried HOT 1
- Add code completion for labels
- Re-add semantic tokens for string literals without covering up interpolations
- Support java 21 HOT 1
- Despite best efforts a sea of red in vscode: MISSING_BUILT_IN_DECLARATION HOT 1
- language server won`t start after update gradle from 8.5 to 8.6 HOT 2
- Neovim + Android + Mason: Unresolved references for certain android dependencies
- Support for multi-module project HOT 4
- Extension fails on Ubuntu devcontainer - couldn't create connection to server. HOT 3
- java.util.concurrent.TimeoutException: Unable to connect language server
- Feature - disable extension on per-file basis to mitigate `Unresolved reference:` errors HOT 2
- Suppress a warning around SLF4J HOT 3
- Too many error messages and exceptions. HOT 2
- bug: Rename variable fails
- LSP causes configuration caching to fail
- Consider increasing MAX_FQNAME_LENGTH HOT 1
- Issue in running language server for neo vim chad using mason.nvim and lspconfig
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlin-language-server.