-
-
Notifications
You must be signed in to change notification settings - Fork 70
Improvements and Next Steps for the Processing Language Server (LSP) #1041
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
Hey @SableRaf would love to work on Displaying parameters name in the function signatures functionality, i can go ahead with it right? |
Hi @Gmin2! Nice to hear from you 😃 Sure, if you'd like to make a PR, we'll be happy to review it. |
the build is broken for the lsp server when i create a client and connect to the lsp server, the server does not compile, should i show the error logs here ? |
Hi @Gmin2! Thanks for looking into it. Please do share the logs, thanks. A quick note: with 4.4.0 and 4.4.1 the internal layout of the Processing app changed somewhat, breaking the cc @Stefterv |
Also p.s. to keep this issue on topic, feel free to hop onto the |
@Gmin2 You can use this link https://discord.gg/f9sCs2uY (note that it will expires in 7 days) |
I've added #1059 to help aid in the development of the LSP, if anyone has suggestions or ideas on how to improve, let me know! |
Thinking about this issue, I was really curious about whether it would be possible to integrate with Eclipse's LSP implementation, which is the foundation for VS Code's Java plugin. I did a quick proof of concept to demonstrate that this is possible: Screen.Recording.2025-06-01.at.11.31.32.AM.movAs you can see, basic things like syntax hi-lighting, completion, hover definitions, and go to definition in Processing's source all work out of the box, which is pretty cool! How this works: It's a bit flakey and I'm sure my source mapping logic is brittle and not particularly robust. But nice to validate that this is possible. If I were to go deeper here, I'd suggest speaking to some of the Eclipse devs themselves and seeing if they have any advice. The changes necessary to the core LSP classes was pretty minimal, but this is in general a difficult kind of thing to maintain through rebases. Ideally, we'd be able to sub-class some of their classes in our own JAR that we add to the classpath as a new entrypoint for the entire LSP process. I also didn't give much consideration to how multi-file Processing projects would work, but presumably the invisible project pattern could handle them? I still think that it may also be useful to point people who want to do editing outside of the PDE to just using regular Java, as the experience is likely to be better. Developing some kind of tooling that could convert a processing sketch into a Maven project could be a better approach overall. Edit: Ran out of time to clean up the PoC and push but can later if there's interest. |
Uh oh!
There was an error while loading. Please reload this page.
We’re revisiting the Processing Language Server with the goal of improving support for writing and editing Processing code outside the PDE.
Background
Several contributors have laid important groundwork for this effort:
pr05
grant in 2024, @diyaayay worked on another VS Code extension though it did not make use of the built-in LSP.Proposed Improvements
We’d like to improve and extend the current functionality of the built-in LSP. Priorities are:
copy(sx, sy, sw, sh, dx, dy, dw, dh)
) should show named parameterscolorMode(mode)
,colorMode(mode, max)
,colorMode(mode, max1, max2, max3)
)If you're interested in contributing or discussing further, feel free to comment here.
Thanks again to everyone who has contributed to this work so far!
The text was updated successfully, but these errors were encountered: