-
Notifications
You must be signed in to change notification settings - Fork 20
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
LSP Plugin start error #345
Comments
Have you this error only with nightly build or with 0.0.1 release too? Could you share your pr please? |
|
It should work with 0.0.1 too. Let me try your project. |
I cannot understand it seems your language server can be started now? Have you fixed your original error? |
I didn't do any fixing, I just skipped the exception, because the exception doesn't affect my normal startup. |
Can you provide a full stacktrace of the error (without skipping the exception)? |
So I tried your plugin. First, I had to change the lsp4ij version to "com.redhat.devtools.lsp4ij:0.0.2-20240612-023956@nightly", because you're debugging with
this is caused by the LUA language server requesting
|
There's an open bug about the LUA server ignoring the Client capability configuration |
Thanks, I'll ask the author to take care of this as soon as possible.
|
I got the lua server working fine with #346 on Mac, the slashes may not be an issue. Please try to manually install the LSP4IJ-0.0.2-SNAPSHOT file from https://github.com/redhat-developer/lsp4ij/actions/runs/9480917967. |
@CppCXY I found a real problem with lua on IntelliJ though, but it's unrelated to LSP4IJ or the Lua LSP itself, it's probably coming from your own lua parser: any file containing things like |
Thanks, I tried, but it still doesn't work, I know very well that it doesn't really read the data in the workspace, it reinterprets learn/ as learn/learn, see the log:
I know it's true that luals itself has processing problems, but it still works fine on other platforms like neovim. |
Then it might be a windows specific issue, as I said, everything's fine on Mac. We need to check on windows |
I'm aware of this problem, because its intellij frontend comes from emmylua, and intellij-emmylua doesn't yet support the doc syntax for luals, but neither jetbrain lsp nor lsp4ij support semantic highlighting, and I can't get intellij to read vscode syntax definitions. I may optimize the parser later, but it will take a lot of time. |
I didn't install emmylua |
I mean my intellij-sumnekolua its analyzing front-end is come from emmylua |
I created a PR for that #347
I'm studying the problem. |
I tested the latest build from our main branch (https://github.com/redhat-developer/lsp4ij/actions/runs/9484891140) on a Windows 11 VM. The plugin starts, I don't see any issues with a trailing slash in the rootPath |
It actually doesn't get anything from the workspace, you can't get hints from other files and it can't read the .luarc.json file in the workspace. for example, if you choose to quick fix and disable a diagnostic in the workspace, it will completely fail. |
@CppCXY I have tried your plugin on Windows OS and it seems working, I have completion, higlight, quick fixes etc. The quickfix which doesn't work is the following: When I apply it, I have the error message: which comes from LSP trace:
When you say "fail", is it this problem? Have you completion, higlight which is working? @CppCXY I suggest that you use LSP console to track LSP messages https://github.com/redhat-developer/lsp4ij/blob/main/docs/UserGuide.md#lsp-console |
highlighting is not a feature of the language server, it's handled by the PSI system of JetBrains that I'm using.
LuaLs has owner log file, see: I can see the log about workspace:
due to the bug in luals, it incorrectly locates xx/learn/ to xx/learn/learn, so its analysis of the workspace actually failed, but I noticed that the rootPath sent by both the Jetbrains LSP client and the VSCode LSP client does not contain an ending slash.
the reason for this error is that LuaLS has analyzed a non-existent directory and it cannot create a configuration file there. so, do we need to handle the ending slash? |
Do you have a sample project we can test? |
simpleTest.zip x. |
I mean
You can see that in the I have installed your vscode-lua, and you can enable those LSP trace by adding in the settings.json
I suggest that you promote this settings (to have completion for this settings and in order to vscode recognize this settings) in yourpackage.json like we did for vscode-xml |
IMHO I think Lua LS should take care of that, but I created the following PR #348 I fixed rootUri and rootPath but the fix was not enough. I had to do the same fix on WorkspaceFolder uri and now it is working pretty well with my Windows OS! |
Thanks! |
it's a windows only problem. this problem should no longer exist after you fix it |
You mean that my fix which removes '/' fixes your issue with completion? If it that I have tested without my PR and it is working too. |
@CppCXY please try https://plugins.jetbrains.com/plugin/23257-lsp4ij/versions/nightly/555671?noRedirect=true it should work much better on windows |
I have another question. Currently, I can't find references by using Ctrl + left mouse click. JetBrains LSP will support using "Find Usage" for references in 2024.2 EAP 5. But I found that this plugin is implemented in goto/LSP references. |
See doc at https://github.com/redhat-developer/lsp4ij/blob/main/docs/LSPSupport.md#references |
I can't see Find Usage |
not all, just one But as you are using custom FileType, I think it will not work. |
Let me try finding a solution... |
@CppCXY please open a new ticket about find references, now that your plugin starts working with LSP4IJ |
I always get a startup error:
cause by:
this my plugins.xml
The text was updated successfully, but these errors were encountered: