Julia-vscode: Latex completion not working

Created on 28 Nov 2018  Â·  36Comments  Â·  Source: julia-vscode/julia-vscode

Hi,

I've installed 0.11.0-beta2 and run it with Code 1.29.1 and Julia 1.02 on OS X. For some reason, when I type \beta[tab] in my Julia REPL it works, but if I open a file foo.jl and type it there it doesn't. Have I messed something up (can I check that somehow?) or is 0.11.0-beta2 not supporting this?

Otherwise, thanks for an excellent extension and the work you put in this!

area-ls-completion bug

Most helpful comment

Sorry to leave a fairly unhelpful "me too" comment, but I have experienced the same problem using Julia 1.5.3, Visual Studio Code 1.51.1, julia-vscode 1.0.9 and 1.0.10 - worked around this with suggestion above to use the Fast Unicode Math Characters plugin.

All 36 comments

I've restarted and all, and I noticed this now:

Could not start the julia language server. Make sure the configuration setting julia.executablePath points to the julia binary.

(it points to the executable)

And when trying to run the REPL I get:
"The terminal process terminated with exit code: 1"
And in the terminal I see a stacktrace flying by after this message:
"ERROR: LoadError: UndefVarError: Display not defined"

These are the only packages I have installed:
screenshot 2018-11-28 at 22 19 40

And when removing the extension (Julia-vscode) and reinstalling 0.11.0-beta2 I can now open the REPL again, the language server is not complaining, but latex completion still doesn't work.

The language server will take a long time the first time you start it before it is operational, can you just give it some time and see whether it then starts to work? A couple minutes...

The server starts immediately now (used Atom today). However, \beta[tab] does not produce a beta?

@ZacLN any idea?

Is this vscode or Atom? Do other language features work (i.e. hovers)? Do other completions work?

When I open VS code (and 0.11.0-beta2) and type \beta[tab] the following happens for 20 sek:
screenshot 2018-11-30 at 16 39 38

And then this happens (notice also bottom right corner):
screenshot 2018-11-30 at 16 41 19

Thank you for working on this project.

Will the “Could not start the julia language server” bug observed on Julia 1.0/MacOS/VS Code be address by v0.11.0 GA?

Also, wondering if you’d suggest using Atom in the interim. Just getting started with Julia.
Cheers

I think this extension is still under development so using Atom in the meantime (with Juno) is probably your best bet.

If you have trouble getting set up, see http://lectures.quantecon.org/jl/getting_started.html and http://lectures.quantecon.org/jl/tools_editors.html

Thank you.

“You're a real prince. You're a gentleman and a scholar,"

Arnavs.

When the language server crashes, there should be an option to send an automatic crash report. Did you do that? In general, that is the most helpful thing for us if you can agree to that.

Hi, I use VS code, and I very like it, it's faster than Atom.
Unfortunately, \bate + "tab" don't work.
I use Win, Julialang 0.11.4 and last version Julia.

Should it work or not?

I can confirm latex completion is not working on vscode 1.31.1, julia-vscode 0.11.4, julia 1.1.0. No autocompletion either (no hover menus in .jl files). Code block execution is working fine. vscode logs are not very helpful, can I help with debugging this in any way?

[2019-02-20 17:09:39.168] [exthost] [info] eager extensions activated
[2019-02-20 17:09:48.974] [exthost] [info] ExtensionService#_doActivateExtension julialang.language-julia {"startup":false,"activationEvent":"onLanguage:julia"}
[2019-02-20 17:09:48.974] [exthost] [info] ExtensionService#loadCommonJSModule /home/fgogianu/.vscode/extensions/julialang.language-julia-0.11.4/out/extension

@davidanthoff this is actually related to https://github.com/JuliaEditorSupport/julia-vscode/issues/647, right?

Probably...

Thanks, I compiled julia 1.0.3 and I can confirm latex completion, linter and autocomplete are working.

We used to have the latex support not in the language server but as snippets (see here). I don't remember why we changed that. @ZacLN, do you remember?

I'm not sure if this is related, but LaTeX completion is sometimes doesn't work for me. Here's a particularly weird example:

εₓ ~ Normal(0,1)
x = ÎĽ .* \varepsil<TAB>

x

The <TAB> inserts a literal '\t'. Oddly enough, if I remove the "\nx" at the end everything is back to normal (one '\n' is ok, two is not).

I'm running 0.11.5 on this setup:

Version: 1.33.1
Commit: 51b0b28134d51361cf996d2f0a1c698247aeabd8
Date: 2019-04-12T08:59:47.459Z
Electron: 4.1.4
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.30-electron.0
OS: Linux x64 4.19.34-1-MANJARO

For those coming looking for a workaround, I've found the Fast Unicode Math Characters a pretty natural replacement for this functionality.

It would be nice if the latex in the repl and vscode worked the same.

\mu<tab> (just inserts space)

@alecloudenback that extension seems to fix things

Hi, with version 0.12.1 on MacOS this works:
\mu<tab>

But this doesn't:
\^2<tab>.

Unicode autocomplete worked in my previous version of VSCode + Julia (don't remember the version sadly). But now with julia extension v. 0.13.1 it's not working.\alpha + TAB does nothing.

If that helped - I supplied fake path to julia executable in Julia VSCode Extension, to avoid CPU load.

Somewhat unsurprisingly, supplying a fake path means the extension won't work

Does unicode autocompletion depend on julia executable?

Yep

It seems like you should just pull out the unicode tab completion and use https://marketplace.visualstudio.com/items?itemName=oijaz.unicode-latex or similar.

I tried the unicode-latex package before but had some trouble with it… messing up writing LateX itself probably. Maybe it has improved, maybe I should try it again. But, yeah, these fancy packages with “smart” features are more trouble than they're worth. I just need syntax highlighting, basic auto-indentation (new block => indent next line when I press enter, otherwise keep same level), and unicode expansion. tab-completion of other symbols is nice, but not essential. Any sort of auto-bracketing and so on (ahem, LaTeX-workshop) just rips my eyes out of their sockets. And right now the Julia package is producing a list of 200 supposed "errors" (”missing reference” that it's too bloody stupid to figure out) that intermingle with the proper LaTeX build errors in the same workspace.

I should probably point out that the problem still exists. Sometimes after launching VS Code autocompletions start working but then break after short period of time. And I found a few julia processes in terminal/top, which where most likely spawned by code, but continued working after code is shut down (saw this multiple times)

I think this may merit opening a different issue, but in .jmd files, tab completion works outside of code blocks, but not inside them. Any thoughts?

Sorry to leave a fairly unhelpful "me too" comment, but I have experienced the same problem using Julia 1.5.3, Visual Studio Code 1.51.1, julia-vscode 1.0.9 and 1.0.10 - worked around this with suggestion above to use the Fast Unicode Math Characters plugin.

I've been seeing this too on and off. I'm currently using 1.0.10 with vs-code 1.51.1 and 1.52.0-insider, but I've seen it before with other versions as well.

I (accidentally) just discovered is that if there is an open docstring it doesn't complete, but works as soon as the docstring is closed. So, I'd open a file and start writing documentation for a new function:

"""
myfun(a)

Nice documentation goes here, m\^2\

Would produce nothing, but:

"""
myfun(a)

Nice documentation goes here m\^2\ """

Completes as expected, as long as the docstring is closed _before_ typing m\^2\

Not sure if this is a bug or by design.

@ericgreveson

Sorry to leave a fairly unhelpful "me too" comment, but I have experienced the same problem using Julia 1.5.3, Visual Studio Code 1.51.1, julia-vscode 1.0.9 and 1.0.10 - worked around this with suggestion above to use the Fast Unicode Math Characters plugin.

Thanks! Have you been able to have dropdown with available mnemonics when you start typing \...?

Just wanted to note once again that this is a symptom of the language server not starting up correctly.

@leventov - I have now updated to the Julia Insider 1.0.11 plugin (also I'm on VS Code 1.52.1 now, if that makes a difference), and it seems like both issues are fixed (language server starts and I can now type \... and get the dropdown without needing any other plugins). So as mentioned above, I guess the mnemonics issue is dependent on the language server issue.

Was this page helpful?
0 / 5 - 0 ratings