-
Notifications
You must be signed in to change notification settings - Fork 0
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
Language Server Protocol #3
Comments
OK, I just saw that there will be two presentations in Prague at the Modelica Conference 2017: And, I found your webpage: |
Hey
I’m going to talk about this papers on Wednesday (May 17th) at the conference. In short: We don't have a YouTube video at the moment. Mo|E wasn't intended to be like the language server protocol |
Thanks, I will try to attend your presentations! |
I attended your talks in Prague and I really liked how the editor looked like and the support it gives to the user, BUT: The more I think about it, the more I am sure that using the language server protocol (LSP) would make a lot of sense here. Their homepage has a list of supported languages and clients: So by implementing a Modelica server (or, Dymola-server, OpenModelica-server and JModelica-server?) you would get Modelica support in quite a bunch of editors right away, including Atom: |
I had a deeper look into the LSP and it has its benefits. I'm not sure if the atom plugin is working right away. For me it looks like we would have to rewrite our plugin and using this (npm?) package. In any case we are going to consider this approach in the future. LSP looks really promising. Because we are in the middle of the semester I don't have the time to do it know. May be in fall. But first I would like to make the whole installation process more easy. Unfortunately I don't know how, because the most complex part is setting up OpenModelica.. I'm glad that you liked the system and thanks for the informations about the LSP. |
Thanks for considering. What exactly do you consider too complicated in the OpenModelica installation? Windows or Linux? |
There are a few things I consider complicated in OpenModelica. The installation itself is a little bit tricky on Linux (except for Ubuntu) and especially hard on OSX. I had to built from source and that was quite a pain and took me over an hour. Sadly I don't even know the problems anymore.. (Another problem is, that there is uninstaller for OSX.) Installation on Windows doesn't seem to be a problem, except finding the installed It would be ideal if we could automate the whole installation process by downloading 1 executable. My big vision is that the user installs the Atom plugin and the whole system is set up automatically while setting up the Atom plugin. But that doesn't seem possible. The current installation procedure is like this:
I would like to reduce the whole process.. |
There are rpm packages for Fedora/RHEL/CentOS: Maybe you could run OpenModelica in a Docker container? After some editing, the users would probably want to simulate, so they need a regular OpenModelica anyway, I would say. Or are you planning to also run simulations from Atom? If so, you could have a look at the hydrogen package, it connects to Jupyter kernels from Atom: |
You are right, currently MoPE is mainly targeted at users who already have OpenModelica installed, but want to use a more comfortable editor for their code. In the future, we would like to tailor it a little more towards teaching Modelica to students. This is where a simpler installation process would really help. In some courses we will probably only use Modelica for one or two exercises, so a full installation of OpenModelica may be a little bit of an overkill for students. We are currently playing around with the idea of hosting Modelica sessions on a web server. With MoPE it should be fairly easy to communicate with an OMC on a different machine, but we would probably need to spawn a new instance of OMC for each user, which could provide some challenges. It would also make sense to have a similar tool for simulating models in a web browser. The main problem is that the MoPE-Team consists of a bright student, who created this project for his thesis and will now move on to other tasks (Nico) and a chronically overworked PhD student (myself). 😉 We may be able to include a few bugfixes and small features, but for any larger improvements or changes we would first have to find another Student who is willing to work with Modelica - wich is hard precisely because of the reasons why we started our effort for MoTE in the first place. I think I will hold on to the idea of using the LSP for MoPE as well as running the MoPE server on a different machine than the client. Both seem to be nice topics for a thesis that are worth investigating. |
Note: I just suggested the same to the OpenModelica developers: |
github seems to be supporting LSP more and more: |
So I had the time to implement parts of the LSP inside the server (see branch lsp). I tested this using Atom and at least in Atom the html documentation is not rendered correctly. It seems like the Atom lsp package does not support html at the moment. There are still some features missing:
|
Nice! I hope LSP documentation is good and it was not too much work to implement this. I'll try to find some time soon to test it. Maybe VSCode is also good a good chocie on the client side for testing, their LSP implementation might be more mature that that in Atom: |
@atrosinenko This might be interesting as well! |
Unfortunately, it would hardly be useful to you, since it was early draft just to experiment with the Maybe OpenModelica/OMEdit#171 would be more interesting source of information and ideas even being written in C++... |
@thorade I ultimately managed to publish it, please excuse me for the delay: https://github.com/atrosinenko/om-lsp-draft. But it is quite ugly and mostly not working :) Published it "just in case". |
Thank you anyway, might be helpful to someone! |
This whole Modelica-Tool-Ensemble looks interesting, but I do not really understand what it does or how it works...
Do you have an introductory text? Conference paper?
Maybe a YouTube video of the components in action or similar?
Is this something similar (or even related to) the "Language Server Protocol"?
http://langserver.org/
The text was updated successfully, but these errors were encountered: