-
Notifications
You must be signed in to change notification settings - Fork 22
lsp4ij: Add support for Regal language server #190
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
|
Hey @vgramer, if you have any time to look this one over that'd be appreciated! |
Signed-off-by: Charlie Egan <[email protected]>
|
@charlieegan3 thanks so much for using LSP4IJ. Please note that i am improving dap api to customize breakpoint type, configuration type, configuration settings editor, etc If you install lsp4ij nighthy you qhould have rhose feature. I need to write docs. |
|
To improve your lsp and dap support, you should implement an lsp4ij installer for lsp and dap. Please read doc at https://github.com/redhat-developer/lsp4ij/blob/main/docs%2FUserDefinedLanguageServerTemplate.md |
|
@charlieegan3 thanks for implementing lsp ! the "light" tests are failling because IDE create file in temp FS (IIRC in memory), which is not compatible with lsp. i think the simpler solution is to disable lsp adn dap for these tests. all light test extends import com.redhat.devtools.lsp4ij.LanguageServerManager
import com.redhat.devtools.lsp4ij.dap.DebugAdapterManager
abstract class OpaTestBase : BasePlatformTestCase(), OpaTestCase {
override fun setUp() {
super.setUp()
// light tests use tempFS which is not compatible with lsp. So we need to disable it
LanguageServerManager.getInstance(myFixture.project).stop("regal")
val debugAdapterManager = DebugAdapterManager.getInstance()
debugAdapterManager.getDebugAdapterServerById("regal-debug")
?.let { debugAdapterManager.removeDebugAdapterServer(it) }
}
}if we need lsp for testing, we can still use Another solution could be to disable lsp and dap programaticcaly in production by
|
This PR uses the lsp4ij library to build in basic support for the Regal language server. I have generally worked on the server component and LSP clients are still a bit of a new thing for me.
For this work, I have as closely as possible followed the guide here - I found it to be very helpful.
Some things that are not perfect:
RegalDebugAdapterDescriptoras it does work, but just not with the same features as other clients yet.Examples of some functionality (
./gradlew :plugin:runIdefor testing)Screen.Recording.2025-07-30.at.10.40.46.mov
Formatting issues (fixed in regal PR)
Screen.Recording.2025-07-29.at.16.21.54.mov
Screen.Recording.2025-07-30.at.10.01.08.mov