-
-
Notifications
You must be signed in to change notification settings - Fork 910
Not sure how to install Lsp Server for kotlin mode. #900
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
The instructions on how to obtain the language server, linked from lsp-mode README are here: https://github.com/fwcd/KotlinLanguageServer |
Hi @yyoncho, I managed to start the Kotlin server from the instructions above, but the problem is I can't seem to "link" it to emacs. I get the error:
Is there a document specifying how to point emacs to the LSP server? Thanks for your time. Marco |
@mcraveiro Check In your case something like that would do the job:
For other servers, we usually have a variable which can be used to point lsp-mode to the server location. |
Thanks @yyoncho. The log file says:
Also, I think also my problem is the name of the server; I have a script called |
Also, for what its worth, I found a lsp-kotlin project [1]. |
Ok, I've made some progress but not quite out of the woods yet. So now my
However, the server fails to start. In
I wonder if this is anything to do with the fact that
The plot thickens... |
Ah actually, just a very very silly emacs user! :-) forgot to put the hash bang in shell script! For anyone else who may be looking for a script to start the kotlin server, mine is now as follows (
I used the packages directly from the official github project [1], which may be a tad old. [1] https://github.com/fwcd/KotlinLanguageServer/releases |
@mcraveiro so you are good? As a side note, it would be good if we do the server downloading automatically - so if you are interested in contributing to lsp-mode you may give it a try. Here it is a PR for lsp-python-ms - emacs-lsp/lsp-python-ms#37 . |
@yyoncho I have managed to get the kotlin server to connect to emacs, but now my problem is that I am getting errors that I do not see when I manually run gradle. I shall investigate those, and then update this ticket with a full set of instructions on how to get kotlin working. I will also look into the PR above and see how hard it is to integrate it all. If it is within my limited skillset, I'll open a PR :-) Thanks for your help. |
@yyoncho kotlin lsp kind of starts, but it's not too useful. *Messages*:
|
@gisochre Do |
@yyoncho thanks. That helped, lsp-mode became mostly functional 👍 |
Actually, I'm still struggling to get KLS to work correctly, though I do not think its an emacs problem. I've taken it to the KLS developers [1]. I'll update this ticket once I get to the bottom of it. Thanks a lot for your help. |
OK, I've done a lot of faffing with this and whilst I am not yet done, my intermediate notes may be helpful to anyone trying to get Kotlin Language Server (KLS) to work. LimitationsWhilst KLS seem to work fine for regular Kotlin code, bear in mind the following limitations:
SetupBoth the build from the git repo and the binaries have a script called
I was also told to put the new directory on the path, e.g.:
After this KLS works fine for me. HTH. [1] https://github.com/fwcd/KotlinLanguageServer/releases/tag/0.1.13 |
I am trying to use kotlin lsp mode and i cannot make it work in kotlin mode. After install kotlin mode, then i tried to install kotlin server using npm but seem like it is not an npm package and now i could not figure out what should i do. Please give some instruction to install lsp server for kotlin.
The text was updated successfully, but these errors were encountered: