Skip to content
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

Supply namespace information to autocompletion provider? #33

Closed
MasonProtter opened this issue Aug 29, 2018 · 5 comments
Closed

Supply namespace information to autocompletion provider? #33

MasonProtter opened this issue Aug 29, 2018 · 5 comments
Labels

Comments

@MasonProtter
Copy link

One idea that came up in a discussion on Slack regarding emacs autocompletion in julia-mode is that it's hard (from what I understand) to get autocompletion for Julia that knows about user-defined types, variables, functions, etc. It was suggested to me that one possible solution would be to have julia-repl query the running repl to find a list of defined names in the running Julia session and then that list of names can be sent to company-mode for autocompletion. Is this something that is possible with the current architecture of julia-repl?

If so, how difficult would it be to implement?

Is there perhaps a different better way to get smart juno-style autocompletion in emacs for Julia that I don't know about?

@MasonProtter MasonProtter changed the title Supply autocompletion information to company? Supply autocompletion information to autocompletion provider? Aug 29, 2018
@MasonProtter MasonProtter changed the title Supply autocompletion information to autocompletion provider? Supply namespace information to autocompletion provider? Aug 29, 2018
@non-Jedi
Copy link

I have a plugin for lsp-mode that uses LanguageServer.jl and should do what you're asking for: https://github.com/non-Jedi/lsp-julia

To be honest, it's a bit flaky still, the README badly needs updated, and it probably needs some changes for 0.7/1.0. But I feel like long term LanguageServer.jl is gonna be what we want to use in emacs for julia completions.

@tpapp
Copy link
Owner

tpapp commented Aug 30, 2018

@MasonProtter: the current architecture does not support this, and I have don't have any obvious idea how it could be done. The problem is that julia-repl does not communicate with the process, it literally just sends text to a terminal. Doing what you suggest would probably be a different package.

I am following LanguageServer-related developments of by @non-Jedi and others with interest, and would be very happy to see a solution to these things. Think of julia-repl as an imperfect, limited solution that works now, until the good solutions emerge.

@tpapp tpapp added the wontfix label Aug 30, 2018
@tpapp
Copy link
Owner

tpapp commented Sep 2, 2018

Another solution I could imagine is just starting a parallel process that communicates with julia-repl, and allows basic queries. This is all feasible, but currently beyond the time I can devote do this project; it would also duplicate functionality (of lsp-julia). So I am closing this issue for now, but if anyone has something concrete that would be easy to integrate, feel free to open an issue.

@tpapp tpapp closed this as completed Sep 2, 2018
@MasonProtter
Copy link
Author

@non-Jedi What functionality from lsp-mode are you able to get working with Julia through lsp-julia? Currently I'm not able to get anything to work but I also don't really know what I'm doing

@non-Jedi
Copy link

non-Jedi commented Sep 5, 2018

@MasonProtter First of all, if you're on Julia 1.0.0, I haven't tested that at all yet with lsp-julia, so it could be completely broken. If you've read through the README for lsp-mode (https://github.com/emacs-lsp/lsp-mode) and lsp-ui (https://github.com/emacs-lsp/lsp-ui), and can't get stuff from there to work with Julia 0.6, please open an issue about it on https://github.com/non-Jedi/lsp-julia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants