Editor-independent parts of Juno

I am working on implementing and cleaning up various features of my Julia-REPL package for Emacs. I thought it would be more worthwhile to rely on and contribute to existing code that does things. The only IDE I am aware of is Juno. So the question is:

  1. Is there an editor-independent backend library (for completion, getting docstrings, various other things)?
  2. If not, and I should be looking at Juno code, which library should I look at which is mostly editor-agnostic? There are quite a few.

Reading some Juno backend code it looks like it is interfacing with Julia via a socket, I wonder if I could just implement the Emacs frontend for that (currently just running a terminal inside Emacs).

3 Likes

We keep a lot of utilities in CodeTools.jl. We were considering deprecating it but can hold off if it will be useful to another tooling author like yourself. The autocompletion functionality in particular from there should be useful, and there’s a few things that might help if you want to implement evaluation.

To the extent that it’s editor agnostic, I’d be open to putting some of the socket/IPC code in CodeTools and formalising it a bit more (e.g. along the lines of this).

For the julia VS Code extension we implemented a julia language server. The LS implements the Microsoft Language Server Protocol. There are a whole bunch of editors and IDEs that can use a language server, see here. I think we have never tried the julia language server with anything but VS Code, but at least in theory one should be able to re-use it for all these other IDEs as well.

I guess there would be two options here if you wanted to use this setup: a) you could try whether the existing emacs language server protocol client works for julia, or b) you could write your own client for the LS.

2 Likes

I have some old code which is probably better written elsewhere. But maybe some of the more experimental features could provide some inspiration. I have “tuple-completion” here (works only in v0.4) which takes a tuple of types/objects and returns the methods that you can apply to it. I think that’s the correct way of implementing the equivalent of method completion in OO languages (e.g. you type Vector3. and then TAB and see all the methods you can apply to a Vector3). Often you know what parameters you want to call but you don’t remember the method’s name.

I also have completions for English vocabulary (for .md and .txt files) here, including synonyms and “rhymes”, which is very important to write readme’s.

3 posts were split to a new topic: Networked REPL?