-
Notifications
You must be signed in to change notification settings - Fork 33
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
Syntax Highlighting breaks since Jetbrains version 2024.2.1 on error #780
Comments
This error comes from the language server. Which fixes do you expect? |
Enable verbose tracing and compare the requests for both versions. There's likely a difference somewhere that might explain the problem, eg, newer version of Android sending a different payload to your LS |
@angelozerr Thanks for replying. |
You mean that with the same language servers and the same LSP4IJ version if the ql document have some errors it continue to have syntax coloration with IJ < 2024.1 and no syntzx coloration with IJ >= 2024.1 ? If it that could you like @fbricon suggested to share your lsp traces with IJ < 2024.1 and IJ >= 2024.1 in order to compare them. |
@fbricon Thanks for the suggestion. IJ 2024.1.2 IJ 2024.2.2 |
@nikunjarora12345 could you please explain me how to download / install your language server. I have no time to read your doc, sorry. |
@angelozerr no worries. The language server comes bundled with Qt installation which you can download from here: https://www.qt.io/download-qt-installer-oss (You'll need a Qt account) |
I fear that I cannot do something since with the same version of LSP4IJ and the same lsp request (your 2 attached trace files are the same) the behaviour is different with the 2 versions of IJ. To understand the problem we should debug IJ himself but I will not have time to do that. The issue should be fixed on your language server side to support invalid document like other language servers do. |
@angelozerr no worries. Thanks for the replies. I'll also try from my end to see if I can find the discrepancy between the IJ versions. |
If you have time to debug IJ and find a fix, any contribution are welcome! |
Hello.
I'm developing a plugin for the QML Language Server for Android Studio. I get syntax highlighting out of the box using LSP4IJ as shown below.
However, starting from Android Studio Ladybug (Jetbrains 2024.2.1), the syntax highlighting breaks whenever there is an error in the code. It returns back to normal if the error is fixed.
Error in code before Android Studio Ladybug:
![Image](https://private-user-images.githubusercontent.com/13044570/407704864-0b1f3d5e-f7dd-4020-b0db-d0483924f7ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMzg3MDIsIm5iZiI6MTczOTAzODQwMiwicGF0aCI6Ii8xMzA0NDU3MC80MDc3MDQ4NjQtMGIxZjNkNWUtZjdkZC00MDIwLWIwZGItZDA0ODM5MjRmN2VmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE4MTMyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUwZmIxM2M3ZmMyY2I0NjczOTE3OGYzYmZlYTA5ZmQ5N2I1NmZjMjQyZDQ1N2I3NGU5ZjUxZjY5ZWFhOTAzZTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.iy276l2oyNIiN7jcqoXZQnX0UOyGnwJ61ykHy6QK0JE)
Error in code after Android Studio Ladybug:
![Image](https://private-user-images.githubusercontent.com/13044570/407705035-20fd99ad-f306-489d-912f-219fb81185de.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMzg3MDIsIm5iZiI6MTczOTAzODQwMiwicGF0aCI6Ii8xMzA0NDU3MC80MDc3MDUwMzUtMjBmZDk5YWQtZjMwNi00ODlkLTkxMmYtMjE5ZmI4MTE4NWRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE4MTMyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwYjc4OTA0ZTY0M2Y3ZTcxNjQ5YWQ3ODhiNzY5MTgxMGZhMDFiYmI5MzZmNzNmYzZjMGJmZjk3ZmMzM2M0NTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.U7N4U1aOzf886D4BRTsi-JGaECLy-ipzmTyQKk4-5jU)
Tested this bug on regular IntelliJ IDEA and was able to reproduce starting with 2024.2.1 and above. It is configured like this:
![Image](https://private-user-images.githubusercontent.com/13044570/407709677-015650e6-39a7-4a5d-989e-570a29f7b6a0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMzg3MDIsIm5iZiI6MTczOTAzODQwMiwicGF0aCI6Ii8xMzA0NDU3MC80MDc3MDk2NzctMDE1NjUwZTYtMzlhNy00YTVkLTk4OWUtNTcwYTI5ZjdiNmEwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE4MTMyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY1YjY2N2UzZmU2MTk3YWVkMDMyZDI0MjQ3Y2JhMDQwOWRmMmQ5YTA0YjI3ZGI2NDdkOGUzZjczZGM2ZDY1ZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IYitk5i9cJdR6yWrRE_uVZr_Bh3F-XOuuvdoYxMmLuQ)
![Image](https://private-user-images.githubusercontent.com/13044570/407709709-d1ecabac-7192-4537-80de-7840366e46e6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMzg3MDIsIm5iZiI6MTczOTAzODQwMiwicGF0aCI6Ii8xMzA0NDU3MC80MDc3MDk3MDktZDFlY2FiYWMtNzE5Mi00NTM3LTgwZGUtNzg0MDM2NmU0NmU2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDE4MTMyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFiMTQ2MTdmMmQ3Njc2ZmFmYjljNmM5OTcxZDUzZTFjNTU3NGZlYTBkYWMxY2M2ZWU2ZDFlN2RlMDMxMGU1YWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pteFMIrGE9GfoZLBtd2SByebMG29brwe6z57PrzImks)
Errors in Trace Logs:
[Trace - 12:58:37] Received response 'textDocument/semanticTokens/full - (20)' in 1ms. No response returned. Error: { "code": -32800, "message": "Cannot proceed: current QML document is invalid!" }
The text was updated successfully, but these errors were encountered: