quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
303 stars 25 forks source link

Julia doesn't work with Quarto VSCode in `.qmd` files #62

Open ParadaCarleton opened 1 year ago

ParadaCarleton commented 1 year ago

Most importantly, LaTeX autocompletions don't work, so that \ge followed by a tab no longer produces a "Greater than or equal to" sign. Other significant problems include that trying to run a block with "run cell" just inserts the first line without running it: image

And rendering from .qmd seems to be broken as well, with the kernel dying before anything happens. Although strangely, rendering directly from a .ipynb notebook seems to work.

jjallaire commented 1 year ago

I'm not able to reproduce any of these problems (can render and run cell and latex autocomplete is working). We did recently fix an issue with more recent Julia kernels (which could have impacted render). That fix is available in our current v1.3 pre-release build: https://quarto.org/docs/download/prerelease.html

ParadaCarleton commented 1 year ago

I'm not able to reproduce any of these problems (can render and run cell and latex autocomplete is working). We did recently fix an issue with more recent Julia kernels (which could have impacted render). That fix is available in our current v1.3 pre-release build: https://quarto.org/docs/download/prerelease.html

Hmm, can you show me the settings.txt you tested this with so I can compare? The problem persists regardless of version.

I'm getting these problems on Arch Linux, with the latest (AUR) version of VSCode, the latest Julia extension, and the Julia 1.9 beta (but the problem persists if I try the latest stable version instead).

jjallaire commented 1 year ago

Vanilla Julia 1.8.5 + IJulia + Julia Ext v 1.38.2. This on Mac OS. The only Julia related settings I have in settings.json are:

"julia.symbolCacheDownload": true,
"julia.enableTelemetry": false,
ParadaCarleton commented 1 year ago

Vanilla Julia 1.8.5 + IJulia + Julia Ext v 1.38.2. This on Mac OS. The only Julia related settings I have in settings.json are:

"julia.symbolCacheDownload": true,
"julia.enableTelemetry": false,

Hmm, could I see the whole file? It might be something related to some other setting (e.g. Quarto settings or just generic VSCode settings.)

Also, I just tried something and realized--clicking the "run" button only seems to fail if the code block has more than 1 line of code.

ParadaCarleton commented 1 year ago

It seems like the inability to use LaTeX in Julia code blocks is caused by the language server crashing frequently; this only seems to happen while using Quarto. Output here.

jjallaire commented 1 year ago

I don't have an issue w/ multi-line code blocks nor do I see any crashes. If there is a crash in the Julia language server that only occurs w/ Quarto I don't think we can easily debug this (however the developers of the Julia extension probably can and we are happy to incorporate any workarounds, etc. required to make things work).

I'd rather not share my entire config file. Here a subset of settings which could bear on things:

{
    "terminal.integrated.commandsToSkipShell": [
        "language-julia.interrupt"
    ],
    "julia.symbolCacheDownload": true,
    "julia.enableTelemetry": false,
    "jupyter.widgetScriptSources": [
        "jsdelivr.com",
        "unpkg.com"
    ],
    "python.defaultInterpreterPath": "/usr/local/bin/python3",
    "workbench.editor.untitled.hint": "hidden",
    "editor.renderWhitespace": "none",
    "editor.minimap.enabled": false,
    "editor.tabSize": 2,
    "workbench.colorTheme": "Default Light+",
    "editor.inlineSuggest.enabled": true,
}
ParadaCarleton commented 1 year ago

Fixed here.

ParadaCarleton commented 1 year ago

Actually, apparently the issue is not the language server, as sometimes it doesn't work even though the language server is running, and LaTeX autocomplete is working in Julia:

  Activating project at `~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/environments/languageserver/v1.8`
[ Info: Starting the Julia Language Server
[ Info: Symbol server store is at '/home/lime/.config/Code/User/globalStorage/julialang.language-julia/symbolstorev5'.
[ Info: Starting LS at 1679445416
[ Info: Downloading caches...
┌ Info: Couldn't retrieve cache file for TiffImages.
└   exception = HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/T/TiffImages_731e570b-9d59-4bfa-96dc-6df516fadf69/v0.6.3_7e6b0e3e571be0b4dd4d2a9a3a83b65c04351ccc.tar.gz
[ Info: Downloading caches...
┌ Info: Couldn't retrieve cache file for PNGFiles.
└   exception = HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/P/PNGFiles_f57f5aa1-a3ce-4bc8-8ab9-96f992907883/v0.3.17_f809158b27eba0c18c269cf2a2be6ed751d3e81d.tar.gz
[ Info: Downloading caches...
┌ Info: Couldn't retrieve cache file for GenericLinearAlgebra.
└   exception = HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/G/GenericLinearAlgebra_14197337-ba66-59df-a3e3-ca00e7dcff7a/v0.3.5_856610594f8759d2a3d3afe3397ce5242982bfdd.tar.gz
[ Info: Downloading caches...
┌ Info: Couldn't retrieve cache file for Netpbm.
└   exception = HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/N/Netpbm_f09324ee-3d7c-5217-9330-fc30815ba969/v1.1.0_5ae7ca23e13855b3aba94550f26146c01d259267.tar.gz
[ Info: Downloading caches... (80%)
┌ Info: Couldn't retrieve cache file for MathOptInterface.
└   exception = HTTP/2 404 while requesting https://www.julia-vscode.org/symbolcache/store/v1/packages/M/MathOptInterface_b8f27783-ece8-5eb3-8dc8-9495eed66fee/v1.11.4_baa31c7b235492d9a6f2cb31bb533d74345b0614.tar.gz
[ Info: All cache files downloaded. (100%)
[ Info: Loading CDDLib from cache... (0%)
┌ Warning: cddlib_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading LinearAlgebra from cache... (0%)
┌ Warning: libblastrampoline_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
┌ Warning: OpenBLAS_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading Libdl from cache... (0%)
[ Info: Loading SparseArrays from cache... (0%)
[ Info: Loading Serialization from cache... (0%)
[ Info: Loading Random from cache... (0%)
[ Info: Loading SHA from cache... (0%)
┌ Warning: SuiteSparse_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
┌ Warning: MathOptInterface not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading Polyhedra from cache... (0%)
┌ Warning: GenericLinearAlgebra not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading RecipesBase from cache... (0%)
[ Info: Loading SnoopPrecompile from cache... (0%)
[ Info: Loading Preferences from cache... (0%)
[ Info: Loading TOML from cache... (0%)
[ Info: Loading Dates from cache... (0%)
[ Info: Loading Printf from cache... (0%)
[ Info: Loading Unicode from cache... (0%)
[ Info: Loading StaticArrays from cache... (0%)
[ Info: Loading Statistics from cache... (0%)
[ Info: Loading StaticArraysCore from cache... (0%)
[ Info: Loading MutableArithmetics from cache... (0%)
[ Info: Loading Test from cache... (0%)
[ Info: Loading InteractiveUtils from cache... (0%)
[ Info: Loading Markdown from cache... (0%)
[ Info: Loading Base64 from cache... (0%)
[ Info: Loading Logging from cache... (0%)
[ Info: Loading JuMP from cache... (0%)
[ Info: Loading OrderedCollections from cache... (0%)
[ Info: Loading GeometryBasics from cache... (0%)
[ Info: Loading IterTools from cache... (0%)
[ Info: Loading Tables from cache... (0%)
[ Info: Loading DataAPI from cache... (0%)
[ Info: Loading IteratorInterfaceExtensions from cache... (0%)
[ Info: Loading DataValueInterfaces from cache... (0%)
[ Info: Loading TableTraits from cache... (0%)
[ Info: Loading EarCut_jll from cache... (0%)
[ Info: Loading JLLWrappers from cache... (0%)
[ Info: Loading Pkg from cache... (0%)
[ Info: Loading Downloads from cache... (0%)
[ Info: Loading LibCURL from cache... (0%)
[ Info: Loading MozillaCACerts_jll from cache... (0%)
[ Info: Loading LibCURL_jll from cache... (0%)
┌ Warning: LibSSH2_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
┌ Warning: MbedTLS_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading nghttp2_jll from cache... (0%)
[ Info: Loading Artifacts from cache... (0%)
[ Info: Loading Zlib_jll from cache... (0%)
[ Info: Loading NetworkOptions from cache... (0%)
[ Info: Loading FileWatching from cache... (0%)
[ Info: Loading ArgTools from cache... (0%)
[ Info: Loading Tar from cache... (0%)
[ Info: Loading UUIDs from cache... (0%)
[ Info: Loading REPL from cache... (0%)
[ Info: Loading Sockets from cache... (0%)
[ Info: Loading LibGit2 from cache... (0%)
[ Info: Loading p7zip_jll from cache... (0%)
[ Info: Loading StructArrays from cache... (0%)
[ Info: Loading GPUArraysCore from cache... (0%)
[ Info: Loading Adapt from cache... (0%)
[ Info: Loading GeoInterface from cache... (0%)
[ Info: Loading Extents from cache... (0%)
[ Info: Loading GLPK from cache... (6%)
┌ Warning: GLPK_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading AlgebraOfGraphics from cache... (22%)
[ Info: Loading PooledArrays from cache... (22%)
[ Info: Loading Future from cache... (22%)
[ Info: Loading GridLayoutBase from cache... (22%)
[ Info: Loading Observables from cache... (22%)
[ Info: Loading PlotUtils from cache... (22%)
[ Info: Loading ColorSchemes from cache... (22%)
[ Info: Loading ColorTypes from cache... (22%)
[ Info: Loading FixedPointNumbers from cache... (22%)
[ Info: Loading ColorVectorSpace from cache... (22%)
[ Info: Loading TensorCore from cache... (22%)
[ Info: Loading SpecialFunctions from cache... (22%)
[ Info: Loading IrrationalConstants from cache... (22%)
[ Info: Loading ChainRulesCore from cache... (22%)
[ Info: Loading Compat from cache... (22%)
[ Info: Loading LogExpFunctions from cache... (22%)
[ Info: Loading ChangesOfVariables from cache... (22%)
[ Info: Loading DocStringExtensions from cache... (22%)
[ Info: Loading InverseFunctions from cache... (22%)
[ Info: Loading OpenLibm_jll from cache... (22%)
[ Info: Loading OpenSpecFun_jll from cache... (22%)
[ Info: Loading CompilerSupportLibraries_jll from cache... (22%)
[ Info: Loading Colors from cache... (22%)
[ Info: Loading Reexport from cache... (22%)
[ Info: Loading KernelDensity from cache... (22%)
[ Info: Loading StatsBase from cache... (22%)
[ Info: Loading SortingAlgorithms from cache... (22%)
[ Info: Loading DataStructures from cache... (22%)
[ Info: Loading Missings from cache... (22%)
[ Info: Loading StatsAPI from cache... (22%)
[ Info: Loading Distributions from cache... (22%)
[ Info: Loading PDMats from cache... (22%)
[ Info: Loading SuiteSparse from cache... (22%)
[ Info: Loading DensityInterface from cache... (22%)
[ Info: Loading StatsFuns from cache... (22%)
[ Info: Loading HypergeometricFunctions from cache... (22%)
[ Info: Loading DualNumbers from cache... (22%)
[ Info: Loading Calculus from cache... (22%)
[ Info: Loading NaNMath from cache... (22%)
[ Info: Loading Rmath from cache... (22%)
[ Info: Loading Rmath_jll from cache... (22%)
[ Info: Loading QuadGK from cache... (22%)
[ Info: Loading FillArrays from cache... (22%)
[ Info: Loading Interpolations from cache... (22%)
[ Info: Loading AxisAlgorithms from cache... (22%)
[ Info: Loading WoodburyMatrices from cache... (22%)
[ Info: Loading OffsetArrays from cache... (22%)
[ Info: Loading SharedArrays from cache... (22%)
[ Info: Loading Mmap from cache... (22%)
[ Info: Loading Distributed from cache... (22%)
[ Info: Loading Ratios from cache... (22%)
[ Info: Loading Requires from cache... (22%)
[ Info: Loading FFTW from cache... (22%)
[ Info: Loading AbstractFFTs from cache... (22%)
┌ Warning: MKL_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading FFTW_jll from cache... (22%)
[ Info: Loading RelocatableFolders from cache... (22%)
[ Info: Loading Scratch from cache... (22%)
[ Info: Loading Makie from cache... (22%)
[ Info: Loading SignedDistanceFields from cache... (22%)
[ Info: Loading PolygonOps from cache... (22%)
[ Info: Loading MakieCore from cache... (22%)
[ Info: Loading Showoff from cache... (22%)
[ Info: Loading Grisu from cache... (22%)
[ Info: Loading Animations from cache... (22%)
[ Info: Loading Formatting from cache... (22%)
[ Info: Loading FreeType from cache... (22%)
[ Info: Loading CEnum from cache... (22%)
[ Info: Loading FreeType2_jll from cache... (22%)
[ Info: Loading Bzip2_jll from cache... (22%)
[ Info: Loading FFMPEG from cache... (22%)
[ Info: Loading FFMPEG_jll from cache... (22%)
[ Info: Loading LAME_jll from cache... (22%)
[ Info: Loading Opus_jll from cache... (22%)
[ Info: Loading FriBidi_jll from cache... (22%)
[ Info: Loading x264_jll from cache... (22%)
[ Info: Loading libaom_jll from cache... (22%)
[ Info: Loading libvorbis_jll from cache... (22%)
[ Info: Loading Ogg_jll from cache... (22%)
[ Info: Loading x265_jll from cache... (22%)
[ Info: Loading libass_jll from cache... (22%)
[ Info: Loading HarfBuzz_jll from cache... (22%)
[ Info: Loading Libffi_jll from cache... (22%)
[ Info: Loading Cairo_jll from cache... (22%)
[ Info: Loading Fontconfig_jll from cache... (22%)
[ Info: Loading Libuuid_jll from cache... (22%)
[ Info: Loading Expat_jll from cache... (22%)
[ Info: Loading Xorg_libXrender_jll from cache... (22%)
[ Info: Loading Xorg_libX11_jll from cache... (22%)
[ Info: Loading Xorg_libxcb_jll from cache... (22%)
[ Info: Loading XSLT_jll from cache... (22%)
[ Info: Loading XML2_jll from cache... (22%)
[ Info: Loading Libiconv_jll from cache... (22%)
[ Info: Loading Libgpg_error_jll from cache... (22%)
[ Info: Loading Libgcrypt_jll from cache... (22%)
[ Info: Loading Xorg_libXau_jll from cache... (22%)
[ Info: Loading Xorg_libpthread_stubs_jll from cache... (22%)
[ Info: Loading Xorg_libXdmcp_jll from cache... (22%)
[ Info: Loading Xorg_xtrans_jll from cache... (22%)
[ Info: Loading Pixman_jll from cache... (22%)
[ Info: Loading Glib_jll from cache... (22%)
[ Info: Loading Gettext_jll from cache... (22%)
[ Info: Loading Libmount_jll from cache... (22%)
[ Info: Loading PCRE2_jll from cache... (22%)
[ Info: Loading Xorg_libXext_jll from cache... (22%)
[ Info: Loading libpng_jll from cache... (22%)
[ Info: Loading LZO_jll from cache... (22%)
[ Info: Loading Graphite2_jll from cache... (22%)
[ Info: Loading libfdk_aac_jll from cache... (22%)
[ Info: Loading OpenSSL_jll from cache... (22%)
[ Info: Loading FileIO from cache... (22%)
[ Info: Loading UnicodeFun from cache... (22%)
[ Info: Loading Contour from cache... (22%)
[ Info: Loading Isoband from cache... (22%)
[ Info: Loading isoband_jll from cache... (22%)
[ Info: Loading MiniQhull from cache... (22%)
[ Info: Loading QhullMiniWrapper_jll from cache... (22%)
[ Info: Loading Qhull_jll from cache... (22%)
[ Info: Loading Packing from cache... (22%)
[ Info: Loading Match from cache... (22%)
[ Info: Loading MathTeXEngine from cache... (22%)
[ Info: Loading AbstractTrees from cache... (22%)
[ Info: Loading FreeTypeAbstraction from cache... (22%)
[ Info: Loading LaTeXStrings from cache... (22%)
[ Info: Loading Automa from cache... (22%)
[ Info: Loading ScanByte from cache... (22%)
[ Info: Loading SIMD from cache... (22%)
[ Info: Loading TranscodingStreams from cache... (22%)
[ Info: Loading IntervalSets from cache... (22%)
[ Info: Loading StableHashTraits from cache... (22%)
[ Info: Loading CRC32c from cache... (22%)
[ Info: Loading TupleTools from cache... (22%)
[ Info: Loading ImageIO from cache... (22%)
[ Info: Loading QOI from cache... (22%)
┌ Warning: PNGFiles not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading IndirectArrays from cache... (22%)
┌ Warning: Netpbm not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading Sixel from cache... (22%)
[ Info: Loading ImageCore from cache... (22%)
[ Info: Loading MosaicViews from cache... (22%)
[ Info: Loading StackViews from cache... (22%)
[ Info: Loading MappedArrays from cache... (22%)
[ Info: Loading PaddedViews from cache... (22%)
[ Info: Loading Graphics from cache... (22%)
┌ Warning: libsixel_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading JpegTurbo from cache... (22%)
[ Info: Loading JpegTurbo_jll from cache... (22%)
┌ Warning: TiffImages not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading LazyModules from cache... (22%)
[ Info: Loading OpenEXR from cache... (22%)
┌ Warning: OpenEXR_jll not stored on disc
└ @ SymbolServer ~/.vscode/extensions/julialang.language-julia-1.45.1/scripts/packages/SymbolServer/src/SymbolServer.jl:247
[ Info: Loading ColorBrewer from cache... (22%)
[ Info: Loading JSON from cache... (22%)
[ Info: Loading Parsers from cache... (22%)
[ Info: Loading Setfield from cache... (22%)
[ Info: Loading ConstructionBase from cache... (22%)
[ Info: Loading MacroTools from cache... (22%)
[ Info: Loading TriplotBase from cache... (22%)
[ Info: Loading Loess from cache... (22%)
[ Info: Loading Distances from cache... (22%)
[ Info: Loading Dictionaries from cache... (22%)
[ Info: Loading Indexing from cache... (22%)
[ Info: Loading GLM from cache... (22%)
[ Info: Loading StatsModels from cache... (22%)
[ Info: Loading ShiftedArrays from cache... (22%)
[ Info: Loading InvertedIndices from cache... (33%)
[ Info: Loading CairoMakie from cache... (39%)
[ Info: Loading Cairo from cache... (39%)
[ Info: Loading Pango_jll from cache... (39%)
[ Info: Loading DimensionalData from cache... (44%)
[ Info: Loading ArrayInterfaceCore from cache... (44%)
[ Info: Loading IJulia from cache... (50%)
[ Info: Loading SoftGlobalScope from cache... (50%)
[ Info: Loading Conda from cache... (50%)
[ Info: Loading VersionParsing from cache... (50%)
[ Info: Loading ZMQ from cache... (50%)
[ Info: Loading ZeroMQ_jll from cache... (50%)
[ Info: Loading libsodium_jll from cache... (50%)
[ Info: Loading MbedTLS from cache... (50%)
[ Info: Loading ConcreteStructs from cache... (61%)
[ Info: Loading ElasticArrays from cache... (67%)
[ Info: Loading Chain from cache... (72%)
[ Info: Loading DataFrames from cache... (78%)
[ Info: Loading PrettyTables from cache... (78%)
[ Info: Loading StringManipulation from cache... (78%)
[ Info: Loading Crayons from cache... (78%)
[ Info: Loading GLMakie from cache... (83%)
[ Info: Loading MeshIO from cache... (83%)
[ Info: Loading ShaderAbstractions from cache... (83%)
[ Info: Loading ModernGL from cache... (83%)
[ Info: Loading GLFW from cache... (83%)
[ Info: Loading GLFW_jll from cache... (83%)
[ Info: Loading Libglvnd_jll from cache... (83%)
[ Info: Loading Xorg_libXcursor_jll from cache... (83%)
[ Info: Loading Xorg_libXfixes_jll from cache... (83%)
[ Info: Loading Xorg_libXinerama_jll from cache... (83%)
[ Info: Loading Xorg_libXrandr_jll from cache... (83%)
[ Info: Loading Xorg_libXi_jll from cache... (83%)
[ Info: Loading Quarto from cache... (89%)
[ Info: Loading YAML from cache... (89%)
[ Info: Loading StringEncodings from cache... (89%)
[ Info: Received new data from Julia Symbol Server.
tpoisot commented 12 hours ago

As I reported in quarto-dev/quarto-cli#10640 the functionality to expand LaTeX code into unicode is still not working in visual mode.