-
Notifications
You must be signed in to change notification settings - Fork 4
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
Autocompletion server for editors and IDEs #247
Comments
Started developing prototype at https://github.com/06needhamt/morganey-integration-server |
I'm really glad for you, but how is that related to this not yet approved proposal? |
@rexim It may be useful when we come to develop the actual server if this proposal gets approved |
@06needhamt cool |
@keddelzz it feels like |
What do you mean by "Morganey API"? Morganey API is not even defined yet #245. What do you want to call? Actual JVM methods? |
Autocompletion server should provide sufficient functionality without mentioning underlying JVM methods in any way. |
@06needhamt |
@06needhamt It's cool that you started prototyping something. But it doesn't look like a great idea doing that without discussing anything with other people involved into Morganey development. I mean I'm really glad that you're doing something. But if you don't discussing anything with anyone, everyone will do the same with you. And at the end, please don't be surprised if nobody needs your prototype. |
@keddelzz cool! Thank you very much! Are you ok with starting to move |
I have absolutely no problem with that. |
@keddelzz great! I'm gonna take a look at how |
@06needhamt sure! I'm gonna keep the progress captured in this issue. :) |
After a brief research I concluded that unfortunately I don't see let-morganey-rest suitable as a server for Morganey development tools integration. Here are the reasons:
Right now Morganey has two modes: REPL and Execution. I suggest to introduce a third one: Server mode. The use case is the following. If you have a Morganey fatjar you start it like:
If I implement for example an Emacs extension for Morganey I don't even have to ask the user to install or configure anything. I can simply download one jar on first run (or make it a part of the extension distribution), and start Morganey as Server in the background when the user asks to perform autocompletion. The same jar can be also used for executing Morganey programs in Execution mode with IO. And as far as I can see, it's quite easy to introduce such mode. Everything we need for that is already there, we just have to implement a REST interface. We can use [http4s](the same library used by [let-morganey-rest], so it's quite reliable). It comes with its own small HTTP server based on NIO which is perfect for our single user environment. What do you guys think? |
@rexim Sounds Really Good To Me Especially Because No Other Applications Are Required |
I'm not sure if I like the idea of the new mode in morganey. Pros of the new mode:
Cons of the new mode:
I don't really see the advantage to implement the autocompletion server in Morganey over the implementation of it in |
Well, ideally we should either extract the editing support from let-morganey-rest to Morganey, or put the functionality described by @rexim into let-morganey-rest (or a new, independent module?) What will be more convenient for us? From the code base point of view I think that it'll be slightly better to store that in a core module (i.e. Morganey itself). In any case, there should be no code duplication. |
@keddelzz @ForNeVeR if both approaches are almost the same from the developer's point of view, what about the user's one? I mean just a single jar for REPL, Execution and Autocompletion server is rather convenient and @06needhamt pretty much confirmed that. |
Alright, since all of the stakeholder |
Btw, what do you guys think about this thing? https://github.com/Microsoft/language-server-protocol Maybe we should implement this protocol instead of using HTTP. |
Ignore that! They're trying to confuse me! |
This looks good to me because it seems like it handles all relevant file events for you |
Well, it seems like the protocol is supported by VSCode, some Eclipse plugin / mod and Atom, and also for example Rust guys are building their tooling for it. Also there's a Java "binding" (whatever that means). So I think it's a good idea. |
Derived from morganey-lang/morganey-vscode-extension#1 (comment)
The text was updated successfully, but these errors were encountered: