Helix + LanguageServer cache

I’m giving helix a spin. I’ve got Julia configured with:

$ cat ~/.config/helix/languages.toml 
[[language]]
name = "julia"
auto-format = true
formatter = { command = "/home/kousu/src/jlfmt", args = ["-"] }

[language-server.julia]
timeout = 20
command = "julia"

[[language]]
name = "typst"
auto-format = true
formatter = { command = "typstyle" }

It’s slow to start up every time so I went digging for ways to improve that. If I watch the log (tail -f ~/.cache/helix/helix.log), every single launch it says this:

...
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (72%)\n"
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (73%)\n"
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (74%)\n"
...

If I understand correctly, under vscode, LanguageServer is supposed to cache – and it does seem so – to,

~/.config/Code - OSS/User/globalStorage/julialang.language-julia/lsdepot

I used lsof to try to find where helix was caching; during the download I saw several connections to GitHub

$ pgrep julia | xargs -n1 sudo ls -p | grep -i tcp
# ...
julia   3083397 kousu 131u     IPv6           12458767       0t0      TCP allium:49192->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 134u     IPv6           12458768       0t0      TCP allium:49208->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 136u     IPv6           12458769       0t0      TCP allium:49210->[2606:50c0:8003::153]:https (ESTABLISHED)
# ...
$ whois '2606:50c0:8003::153' | grep -C 2 CustName


CustName:       GitHub, Inc.
Address:        88 Colin P Kelly Jr Street
City:           San Francisco

So that all checks out. But with the same lsof I can’t see anything that looks like a cache.

lsof
COMMAND     PID  USER  FD      TYPE             DEVICE  SIZE/OFF     NODE NAME
julia   3083397 kousu cwd       DIR              253,4     20480 25035119 /home/kousu/src/testjl
julia   3083397 kousu rtd       DIR              253,2      4096        2 /
julia   3083397 kousu txt       REG              253,2     14552  1248119 /usr/bin/julia
julia   3083397 kousu mem       REG              253,4  12873128 28468132 /home/kousu/.julia/compiled/v1.12/LanguageServer/ite7n_OwB7W.so
julia   3083397 kousu mem       REG              253,4  74838176 28468117 /home/kousu/.julia/compiled/v1.12/SymbolServer/355ac_OwB7W.so
julia   3083397 kousu mem       REG              253,2   3338432  1966100 /usr/share/julia/compiled/v1.12/REPLExt/m7ggP_mAJqa.so
julia   3083397 kousu mem       REG              253,4    932448 28468129 /home/kousu/.julia/compiled/v1.12/StaticLint/FgruE_OwB7W.so
julia   3083397 kousu mem       REG              253,2  69250832  1863064 /usr/share/julia/compiled/v1.12/Pkg/tUTdb_mAJqa.so
julia   3083397 kousu mem       REG              253,2   2666416  1862944 /usr/share/julia/compiled/v1.12/Downloads/eiA4B_mAJqa.so
julia   3083397 kousu mem       REG              253,2   1976368  1199010 /usr/lib/libunistring.so.5.2.0
julia   3083397 kousu mem       REG              253,2   2276176  1862994 /usr/share/julia/compiled/v1.12/LibGit2/xrYJZ_mAJqa.so
julia   3083397 kousu mem       REG              253,2   1954088  1862909 /usr/share/julia/compiled/v1.12/ArgTools/aGHFV_mAJqa.so
julia   3083397 kousu mem       REG              253,2   5704872  1188417 /usr/lib/libcrypto.so.3
julia   3083397 kousu mem       REG              253,2    379936  1196367 /usr/lib/libnss_mymachines.so.2
julia   3083397 kousu mem       REG              253,4  12068440 25559653 /home/kousu/.julia/compiled/v1.12/JuliaFormatter/OWZnm_OwB7W.so
julia   3083397 kousu mem       REG              253,2    211304  1196368 /usr/lib/libnss_resolve.so.2
julia   3083397 kousu mem       REG              253,2    809032  1195425 /usr/lib/libkrb5.so.3.3
julia   3083397 kousu mem       REG              253,4   6561968 25441771 /home/kousu/.julia/compiled/v1.12/CommonMark/LZtHZ_OwB7W.so
julia   3083397 kousu mem       REG              253,4    308832 25429168 /home/kousu/.julia/compiled/v1.12/URIs/eec2u_BREcB.so
julia   3083397 kousu mem       REG              253,4    203136 28468120 /home/kousu/.julia/compiled/v1.12/JSONRPC/Gwkvk_OwB7W.so
julia   3083397 kousu mem       REG              253,4   2324248 25441779 /home/kousu/.julia/compiled/v1.12/DataStructures/xKiwJ_OwB7W.so
julia   3083397 kousu mem       REG              253,2    448408  1966145 /usr/share/julia/compiled/v1.12/Tar/G9ZYP_mAJqa.so
julia   3083397 kousu mem       REG              253,2   1349104  1248011 /usr/lib/libgit2.so.1.9.1
julia   3083397 kousu mem       REG              253,4   4671408 28468123 /home/kousu/.julia/compiled/v1.12/CSTParser/R4aS6_OwB7W.so
julia   3083397 kousu mem       REG              253,2    595376  1862984 /usr/share/julia/compiled/v1.12/LibCURL/ht49g_mAJqa.so
julia   3083397 kousu mem       REG              253,4   2073656 28468114 /home/kousu/.julia/compiled/v1.12/Tokenize/7Oi97_OwB7W.so
julia   3083397 kousu mem       REG              253,2  32770232  1966095 /usr/share/julia/compiled/v1.12/REPL/u0gqU_mAJqa.so
julia   3083397 kousu mem       REG              253,2   4755480  1863029 /usr/share/julia/compiled/v1.12/Markdown/AREjX_mAJqa.so
julia   3083397 kousu mem       REG              253,2     43064  1195725 /usr/lib/libcap.so.2.77
julia   3083397 kousu mem       REG              253,4     34208 28468126 /home/kousu/.julia/compiled/v1.12/TestItemDetection/gEFYI_OwB7W.so
julia   3083397 kousu mem       REG              253,2    946880  1202178 /usr/lib/libcurl.so.4.8.0
julia   3083397 kousu mem       REG              253,2    141264  1201832 /usr/lib/libbrotlicommon.so.1.1.0
julia   3083397 kousu mem       REG              253,2    182320  1195405 /usr/lib/libk5crypto.so.3.1
julia   3083397 kousu mem       REG              253,2    946136  1188419 /usr/lib/libssl.so.3
julia   3083397 kousu mem       REG              253,2  32190344  1247984 /usr/lib/libopenblas_64.so.0.3
julia   3083397 kousu mem       REG              253,2    748224  1862959 /usr/share/julia/compiled/v1.12/InteractiveUtils/0TrXF_mAJqa.so
julia   3083397 kousu mem       REG              253,2   1845696  1862964 /usr/share/julia/compiled/v1.12/JuliaSyntaxHighlighting/8OCEv_mAJqa.so
julia   3083397 kousu mem       REG              253,2   8925272  1966130 /usr/share/julia/compiled/v1.12/StyledStrings/UcVoM_mAJqa.so
julia   3083397 kousu mem       REG              253,2     67904  1183870 /usr/lib/libresolv.so.2
julia   3083397 kousu mem       REG              253,2     55544  1195428 /usr/lib/libkrb5support.so.0.1
julia   3083397 kousu mem       REG              253,4   6825304 25441269 /home/kousu/.julia/compiled/v1.12/Parsers/833b9_BREcB.so
julia   3083397 kousu mem       REG              253,2    340240  1195399 /usr/lib/libgssapi_krb5.so.2.2
julia   3083397 kousu mem       REG              253,2    132992  1201853 /usr/lib/libidn2.so.0.4.0
julia   3083397 kousu mem       REG              253,2    148480  1201934 /usr/lib/libnghttp3.so.9.4.0
julia   3083397 kousu mem       REG              253,4    737576 25559651 /home/kousu/.julia/compiled/v1.12/JSON/uf6oy_OwB7W.so
julia   3083397 kousu mem       REG              253,2   2051472  1862929 /usr/share/julia/compiled/v1.12/Dates/p8See_mAJqa.so
julia   3083397 kousu mem       REG              253,2  11745224  1184653 /usr/lib/libgfortran.so.5.0.0
julia   3083397 kousu mem       REG              253,2     55168  1201835 /usr/lib/libbrotlidec.so.1.1.0
julia   3083397 kousu mem       REG              253,4    548248 25430488 /home/kousu/.julia/compiled/v1.12/Crayons/TXPcU_BREcB.so
julia   3083397 kousu mem       REG              253,2     22480  1188171 /usr/lib/libkeyutils.so.1.10
julia   3083397 kousu mem       REG              253,2     75640  1201943 /usr/lib/libpsl.so.5.3.5
julia   3083397 kousu mem       REG              253,2     28528  1863019 /usr/share/julia/compiled/v1.12/Logging/PWFjL_mAJqa.so
julia   3083397 kousu mem       REG              253,2     72664  1966185 /usr/share/julia/compiled/v1.12/p7zip_jll/dfuGM_mAJqa.so
julia   3083397 kousu mem       REG              253,2     26944  1863039 /usr/share/julia/compiled/v1.12/MozillaCACerts_jll/XKIUi_mAJqa.so
julia   3083397 kousu mem       REG              253,2     39672  1862989 /usr/share/julia/compiled/v1.12/LibCURL_jll/9JWaY_mAJqa.so
julia   3083397 kousu mem       REG              253,2     67456  1248005 /usr/lib/libllhttp.so.9.2.1
julia   3083397 kousu mem       REG              253,2   1573320  1248000 /usr/lib/libblastrampoline.so.5
julia   3083397 kousu mem       REG              253,2     39336  1966165 /usr/share/julia/compiled/v1.12/Zlib_jll/xjq3Q_mAJqa.so
julia   3083397 kousu mem       REG              253,2    157736  1201925 /usr/lib/libnghttp2.so.14.29.2
julia   3083397 kousu mem       REG              253,2     39424  1966180 /usr/share/julia/compiled/v1.12/nghttp2_jll/KTGSA_mAJqa.so
julia   3083397 kousu mem       REG              253,4    365160 25428502 /home/kousu/.julia/compiled/v1.12/OrderedCollections/LtT3J_BREcB.so
julia   3083397 kousu mem       REG              253,2    775744  1198259 /usr/lib/libmpfr.so.6.2.2
julia   3083397 kousu mem       REG              253,2    678528  1187919 /usr/lib/libgmp.so.10.5.0
julia   3083397 kousu mem       REG              253,2    301600  1201969 /usr/lib/libssh2.so.1.0.1
julia   3083397 kousu mem       REG              253,2    706856  1198393 /usr/lib/libpcre2-8.so.0.15.0
julia   3083397 kousu mem       REG              253,2 213599080  1348463 /usr/lib/julia/sys.so
julia   3083397 kousu mem       REG              253,2     39600  1862999 /usr/share/julia/compiled/v1.12/LibGit2_jll/nfCpg_mAJqa.so
julia   3083397 kousu mem       REG              253,2    103776  1863044 /usr/share/julia/compiled/v1.12/NetworkOptions/J8H6s_mAJqa.so
julia   3083397 kousu mem       REG              253,2   5654208  1221096 /usr/lib/locale/locale-archive
julia   3083397 kousu mem       REG              253,4     87104 25428485 /home/kousu/.julia/compiled/v1.12/Glob/3FzEV_BREcB.so
julia   3083397 kousu mem       REG              253,4    202936 25431685 /home/kousu/.julia/compiled/v1.12/Preferences/pWSk8_BREcB.so
julia   3083397 kousu mem       REG              253,2   1634192  1184659 /usr/lib/libgomp.so.1.0.0
julia   3083397 kousu mem       REG              253,2   2178656  1348442 /usr/lib/julia/libjulia-codegen.so.1.12.1
julia   3083397 kousu mem       REG              253,2    151456  1862914 /usr/share/julia/compiled/v1.12/Base64/D7K0n_mAJqa.so
julia   3083397 kousu mem       REG              253,2    149880  1966140 /usr/share/julia/compiled/v1.12/TOML/mjrwE_mAJqa.so
julia   3083397 kousu mem       REG              253,2  31859544  1199270 /usr/lib/libicudata.so.76.1
julia   3083397 kousu mem       REG              253,2     39536  1863004 /usr/share/julia/compiled/v1.12/LibSSH2_jll/K6mup_mAJqa.so
julia   3083397 kousu mem       REG              253,4     84592 25431660 /home/kousu/.julia/compiled/v1.12/Compat/GSFWK_BREcB.so
julia   3083397 kousu mem       REG              253,2    179464  1863034 /usr/share/julia/compiled/v1.12/Mmap/GDYy0_mAJqa.so
julia   3083397 kousu mem       REG              253,2   2095152  1199285 /usr/lib/libicuuc.so.76.1
julia   3083397 kousu mem       REG              253,2    164056  1966085 /usr/share/julia/compiled/v1.12/Printf/3FQLY_mAJqa.so
julia   3083397 kousu mem       REG              253,2   1260488  1199368 /usr/lib/libxml2.so.16.1.1
julia   3083397 kousu mem       REG              253,2    453896  1184740 /usr/lib/libncursesw.so.6.5
julia   3083397 kousu mem       REG              253,2    935880  1196333 /usr/lib/libzstd.so.1.5.7
julia   3083397 kousu mem       REG              253,2 135595256  1248032 /usr/lib/libLLVM.so.18.1jl
julia   3083397 kousu mem       REG              253,2     18376  1188077 /usr/lib/libcom_err.so.2.1
julia   3083397 kousu mem       REG              253,2     45856  1863054 /usr/share/julia/compiled/v1.12/OpenSSL_jll/M3X35_mAJqa.so
julia   3083397 kousu mem       REG              253,2   2112592  1348445 /usr/lib/julia/libjulia-internal.so.1.12.1
julia   3083397 kousu mem       REG              253,4     15288 25436137 /home/kousu/.julia/compiled/v1.12/CompatLinearAlgebraExt/Zxpzq_BREcB.so
julia   3083397 kousu mem       REG              253,4     53024 25437282 /home/kousu/.julia/compiled/v1.12/PrecompileTools/AQ9Mk_BREcB.so
julia   3083397 kousu mem       REG              253,2     45632  1966155 /usr/share/julia/compiled/v1.12/UUIDs/SIw1t_mAJqa.so
julia   3083397 kousu mem       REG              253,2    211152  1195956 /usr/lib/liblzma.so.5.8.1
julia   3083397 kousu mem       REG              253,2    100368  1187933 /usr/lib/libz.so.1.3.1
julia   3083397 kousu mem       REG              253,2    223344  1216824 /usr/lib/libedit.so.0.0.75
julia   3083397 kousu mem       REG              253,2     78624  1966160 /usr/share/julia/compiled/v1.12/Unicode/E4Hzs_mAJqa.so
julia   3083397 kousu mem       REG               0,16           12693700 anon_inode:[io_uring] (stat: No such file or directory)
julia   3083397 kousu mem       REG              253,2    354176  1217216 /usr/lib/libutf8proc.so.3.1.0
julia   3083397 kousu mem       REG              253,2  22480456  1184677 /usr/lib/libstdc++.so.6.0.34
julia   3083397 kousu mem       REG              253,2   1100400  1183850 /usr/lib/libm.so.6
julia   3083397 kousu mem       REG              253,2     47336  1201682 /usr/lib/libffi.so.8.2.0
julia   3083397 kousu mem       REG              253,2     63384  1217878 /usr/lib/libunwind.so.8.2.0
julia   3083397 kousu mem       REG              253,2    193096  1248035 /usr/lib/libopenlibm.so.4.0
julia   3083397 kousu mem       REG              253,2   2149728  1183840 /usr/lib/libc.so.6
julia   3083397 kousu mem       REG               0,16           12693699 anon_inode:[io_uring] (stat: No such file or directory)
julia   3083397 kousu mem       REG              253,2    174144  1184645 /usr/lib/libatomic.so.1.2.0
julia   3083397 kousu mem       REG              253,2    906056  1184647 /usr/lib/libgcc_s.so.1
julia   3083397 kousu mem       REG              253,2    101560  1248122 /usr/lib/libjulia.so.1.12.1
julia   3083397 kousu mem       REG              253,2    246760  1183831 /usr/lib/ld-linux-x86-64.so.2
julia   3083397 kousu   0r     FIFO               0,15       0t0 12692896 pipe
julia   3083397 kousu   1w     FIFO               0,15       0t0 12692897 pipe
julia   3083397 kousu   2w     FIFO               0,15       0t0 12692898 pipe
julia   3083397 kousu   3u  a_inode               0,16         0      111 [eventpoll:4,8,10,11,20,23]
julia   3083397 kousu   4u  a_inode               0,16         0 12693699 [io_uring]
julia   3083397 kousu   5u  a_inode               0,16         0 12693700 [io_uring]
julia   3083397 kousu   6r     FIFO               0,15       0t0 12693701 pipe
julia   3083397 kousu   7w     FIFO               0,15       0t0 12693701 pipe
julia   3083397 kousu   8r     FIFO               0,15       0t0 12693702 pipe
julia   3083397 kousu   9w     FIFO               0,15       0t0 12693702 pipe
julia   3083397 kousu  10u  a_inode               0,16         0      111 [eventfd:155]
julia   3083397 kousu  11r     FIFO               0,15       0t0 12692896 pipe
julia   3083397 kousu  12r      CHR                1,3       0t0        4 /dev/null
julia   3083397 kousu  13w     FIFO               0,15       0t0 12692897 pipe
julia   3083397 kousu  14w     FIFO               0,15       0t0 12692898 pipe
julia   3083397 kousu  15u  a_inode               0,16         0      111 [eventfd:166]
julia   3083397 kousu  16u  a_inode               0,16         0      111 [eventfd:175]
julia   3083397 kousu  17u      REG               0,23         0 12693704 /proc/3083397/mem
julia   3083397 kousu  18r     FIFO               0,15       0t0 12458665 pipe
julia   3083397 kousu  19w     FIFO               0,15       0t0 12458665 pipe
julia   3083397 kousu  20u     unix 0x00000000b1783a8f       0t0 12693102 /tmp/vscjlsymserv-35904065-e27b type=STREAM (LISTEN)
julia   3083397 kousu  21r      REG              253,2    226607  1863083 /etc/ca-certificates/extracted/tls-ca-bundle.pem
julia   3083397 kousu  22u  a_inode               0,16         0      111 [eventfd:35]
julia   3083397 kousu  23u     unix 0x0000000081b431e3       0t0 12693110 /tmp/vscjlsymserv-35904065-e27b type=STREAM (CONNECTED)
julia   3083397 kousu  24w     FIFO               0,15       0t0 12693108 pipe
julia   3083397 kousu  25r     FIFO               0,15       0t0 12693109 pipe
julia   3083397 kousu 131u     IPv6           12458767       0t0      TCP allium:49192->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 134u     IPv6           12458768       0t0      TCP allium:49208->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 136u     IPv6           12458769       0t0      TCP allium:49210->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 139u     IPv6           12458770       0t0      TCP allium:49226->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 140u     IPv6           12458771       0t0      TCP allium:49240->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 141u     IPv6           12458772       0t0      TCP allium:49244->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 144u     IPv6           12458773       0t0      TCP allium:49260->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 147u     IPv6           12458758       0t0      TCP allium:49106->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 153u     IPv6           12458762       0t0      TCP allium:49140->[2606:50c0:8003::153]:https (ESTABLISHED)
julia   3083397 kousu 154u     IPv6           12458763       0t0      TCP allium:49148->[2606:50c0:8003::153]:https (ESTABLISHED)

So what’s up? It easily takes 10s every time I open a file. Does LanguageServer.jl need some environment variable set to tell it where to cache?

(following from Helix + LanguageServer.jl + JuliaFormatter.jl but that’s specifically about the formatter and this seems like a deeper issue)

Thank you in advance for any direction you can provide me.

Versions
$ julia --version
julia version 1.12.1
(@v1.12) pkg> st
Status `~/.julia/environments/v1.12/Project.toml`
  [00ebfdb7] CSTParser v3.4.3
  [31c24e10] Distributions v0.25.122
  [5789e2e9] FileIO v1.17.1
  [08572546] FlameGraphs v1.1.0
  [82e4d734] ImageIO v0.6.9
  [98e50ef6] JuliaFormatter v2.2.0
⌃ [2b0e0bc5] LanguageServer v4.1.0
  [91a5bcdd] Plots v1.41.1
  [132c30aa] ProfileSVG v0.2.2
  [c46f51b8] ProfileView v1.10.2
  [276daf66] SpecialFunctions v2.6.1
  [b3cc710f] StaticLint v8.2.2
  [f3b207a7] StatsPlots v0.15.8
1 Like

Hmm, that certainly is odd. I just cleared my helix log and re-opened my julia project in it i.e. I have been using Helix so the LanguageServer.jl (LS) cache should be up to date. Then log starts with

helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (0%)\n"
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (25%)\n"
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (50%)\n"
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (75%)\n"
helix_lsp::transport [ERROR] julia err <- "[ Info: All cache files downloaded (took 2.2s). (100%)\n"
helix_lsp::transport [ERROR] julia err <- "[ Info: Package [PACKAGE] is cached.\n"
.
.
.

I just use the default julia configuration that ships with Helix. Though it also looks like the LS wiki uses a slightly different configuration in their minimal working example. In either case, a difference I do see between with your language config is the explicitly specifying the language server Helix should use. The default config has

# DEFAULT HELIX CONFIG
[[language]]
name = "julia"
scope = "source.julia"
injection-regex = "julia"
file-types = ["jl"]
roots = ["Manifest.toml", "Project.toml"]
comment-token = "#"
###############
language-server = { command = "julia", timeout = 60, args = [
    "--startup-file=no",
    "--history-file=no",
    "--quiet",
    "-e",
    "using LanguageServer; runserver()",
    ] }
###############
indent = { tab-width = 4, unit = "    " }

and the LS wiki has

# LS WIKI MINIMAL WORKING EXAMPLE
[[language]]
name = "julia"
scope = "source.julia"
injection-regex = "julia"
file-types = ["jl"]
roots = ["Project.toml", "Manifest.toml", "JuliaProject.toml"]
comment-token = "#"
############################
language-servers = ["julia"]
############################
indent = { tab-width = 4, unit = "    " }

[language-server.julia]
command = "julia"
timeout = 60
args = ["-e", "using LanguageServer; runserver();"]

So my gut says that all you need to do (assuming a manual language config does not use defaults for unspecified fields) is add language-servers = ["julia"] to your language spec after formatter = { command = "/home/kousu/src/jlfmt", args = ["-"] } to get

# *POTENTIALLY* CORRECT CONFIG
[[language]]
name = "julia"
auto-format = true
formatter = { command = "/home/kousu/src/jlfmt", args = ["-"] }
language-servers = ["julia"]

[language-server.julia]
timeout = 20
command = "julia"

I’ve been really liking the Julia experience with Helix after having recently seriously trying to move away from VSCode (actually VSCodium). The tree sitter support and integration with “Space+k” for inline documentation are two of my favorite features.

1 Like

Thank you for taking the time! So there is a working version out there. I was beginning to wonder if no one had tested it in months. I didn’t mention it explicitly but yes, relatedly space+k only works for Base and my current file making it hard to fully cut off vscode.

I tried your suggestion verbatim

# ~/.config/helix/languages.toml
# *POTENTIALLY* CORRECT CONFIG
[[language]]
name = "julia"
auto-format = true
language-servers = ["julia"]

[language-server.julia]
timeout = 20
command = "julia"

And… suddenly it worked! Well not suddenly, it still took a while to boot. At first space+k said

No configured language server supports hover

but after a moment, space+k starts returning results for Base

And after another moment, after the log says

[ Info: Package DataFrames (a93c6f00-e57d-5684-b7b6-d8193f3e46c0) is cached.
[ Info: Symbol server indexing took 33.098201546 seconds.
[ Info: Loading DataFrames from cache... (0%)
[ Info: Done loading DataFrames from cache... (took 0.97s) (0%)
# [ .... cropped ... ]
[ Info: Done loading SentinelArrays from cache... (took 0.032s) (0%)
[ Info: Loaded all packages into cache in 2.9s (100%)
============== Startup timings ==============
       0.0 - LS startup started (0.0s since last event)
  0.040324 - connection established (0.040324s since last event)
# [ .... ]
    51.156 - initial lint done (0.11442s since last event)
=============================================

then space+k has also indexed imported libraries

The caching issue is gone too. I don’t know why, but thank you for fixing Helix for me!

I also tried going with the defaults, back to

# ~/.config/helix/languages.toml
[[language]]
name = "julia"
auto-format = true

And this also worked.


Looking closer So I think the problem was that I was on LanguageServer 4.1.0. I don’t understand why Pkg.add("LanguageServer") installed that version and why Pkg.update() wasn’t upgrading but it must have been broken. Some time yesterday I explicitly installed upgraded to 4.5.1 because it mentioned on some github thread I’ve lost now, but I guess I didn’t retest cleanly. I also upgraded SymbolServer and StaticLint in case that helped :face_with_spiral_eyes:

In summary, what fixed it for me was:

  1. Remove the [language-server.julia] or language-servers = [...] from languages.toml
  2. julia --startup-file=no -e 'using Pkg; Pkg.add(PackageSpec("LanguageServer", v"4.5.1"))

For future people struggling, this config is working:

Versions
  • helix 25.07.1 via Arch

  • julia 1.12.1 via Arch

    $ pacman -Q julia
    julia 2:1.12.1-1
    

These Julia packages installed in my base environment:

(@v1.12) pkg> st
Status `~/.julia/environments/v1.12/Project.toml`
  [2b0e0bc5] LanguageServer v4.5.1
  [efd6af41] ProfileCanvas v0.1.7

Here’s my test project:

run.jl
using DataFrames
X = randn(88)
d = DataFrame(randn(3, 4), ["a", "b", "c", "d"])
s = mapcols(sum, d)
display(s)
Manifest.toml
# This file is machine-generated - editing it directly is not advised

julia_version = "1.12.1"
manifest_format = "2.0"
project_hash = "cfe2c7d3b368778ecb374d01c98235be4d00537c"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
version = "1.11.0"

[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
version = "1.11.0"

[[deps.Compat]]
deps = ["TOML", "UUIDs"]
git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.18.1"
weakdeps = ["Dates", "LinearAlgebra"]

    [deps.Compat.extensions]
    CompatLinearAlgebraExt = "LinearAlgebra"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.3.0+1"

[[deps.Crayons]]
git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.1.1"

[[deps.DataAPI]]
git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.16.0"

[[deps.DataFrames]]
deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "d8928e9169ff76c6281f39a659f9bca3a573f24c"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "1.8.1"

[[deps.DataStructures]]
deps = ["OrderedCollections"]
git-tree-sha1 = "e357641bb3e0638d353c4b29ea0e40ea644066a6"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.19.3"

[[deps.DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
version = "1.11.0"

[[deps.Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"
version = "1.11.0"

[[deps.InlineStrings]]
git-tree-sha1 = "8f3d257792a522b4601c24a577954b0a8cd7334d"
uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48"
version = "1.4.5"

    [deps.InlineStrings.extensions]
    ArrowTypesExt = "ArrowTypes"
    ParsersExt = "Parsers"

    [deps.InlineStrings.weakdeps]
    ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd"
    Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"

[[deps.InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
version = "1.11.0"

[[deps.InvertedIndices]]
git-tree-sha1 = "6da3c4316095de0f5ee2ebd875df8721e7e0bdbe"
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
version = "1.3.1"

[[deps.IteratorInterfaceExtensions]]
git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[deps.JuliaSyntaxHighlighting]]
deps = ["StyledStrings"]
uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011"
version = "1.12.0"

[[deps.LaTeXStrings]]
git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c"
uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
version = "1.4.0"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
version = "1.11.0"

[[deps.LinearAlgebra]]
deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
version = "1.12.0"

[[deps.Markdown]]
deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
version = "1.11.0"

[[deps.Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.2.0"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.29+0"

[[deps.OrderedCollections]]
git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.8.1"

[[deps.PooledArrays]]
deps = ["DataAPI", "Future"]
git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3"
uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
version = "1.4.3"

[[deps.PrecompileTools]]
deps = ["Preferences"]
git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77"
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
version = "1.3.3"

[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "0f27480397253da18fe2c12a4ba4eb9eb208bf3d"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.5.0"

[[deps.PrettyTables]]
deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "REPL", "Reexport", "StringManipulation", "Tables"]
git-tree-sha1 = "6b8e2f0bae3f678811678065c09571c1619da219"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "3.1.0"

[[deps.Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
version = "1.11.0"

[[deps.REPL]]
deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
version = "1.11.0"

[[deps.Random]]
deps = ["SHA"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
version = "1.11.0"

[[deps.Reexport]]
git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "1.2.2"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[deps.SentinelArrays]]
deps = ["Dates", "Random"]
git-tree-sha1 = "712fb0231ee6f9120e005ccd56297abbc053e7e0"
uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
version = "1.4.8"

[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
version = "1.11.0"

[[deps.SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.2.2"

[[deps.Statistics]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0"
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
version = "1.11.1"

    [deps.Statistics.extensions]
    SparseArraysExt = ["SparseArrays"]

    [deps.Statistics.weakdeps]
    SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.StringManipulation]]
deps = ["PrecompileTools"]
git-tree-sha1 = "725421ae8e530ec29bcbdddbe91ff8053421d023"
uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e"
version = "0.4.1"

[[deps.StyledStrings]]
uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b"
version = "1.11.0"

[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.3"

[[deps.TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "1.0.1"

[[deps.Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"]
git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.12.1"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
version = "1.11.0"

[[deps.Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
version = "1.11.0"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.15.0+0"
Project.toml
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"

You can monitor the log [1]

tail -f ~/.cache/helix/helix.log 

and you can test by helix run.jl, putting the cursor on the randn, and pressing space+k a few times. It will take a moment but not longer than a minute to you the docs for rand. For DataFrames it will take longer, especially if it’s your first run, but it will eventually give you the ?help DataFrames in a hovering terminal pseudo-window.


Again thank you @NonDairyNeutrino for taking the time and for providing easy to copy config! I probably would have kept thinking it was broken for weeks if you hadn’t pushed me to take a second look.


  1. Consider emptying this file before every test to be sure what you’re looking at. ↩︎

2 Likes

Oh hang on, nope, I can still trigger it. The sample project I showed above won’t trigger the fail-to-index/re-caching behaviour, but this more realistic project does:

projet.jl
#!/usr/bin/env -S julia

using Distributions
using ActuaryUtilities
using Interpolations

#using Pkg;
#Pkg.activate(@__DIR__);
#Pkg.instantiate();

# Bibliothèques

using DataFrames
using Dates
using Statistics
import XLSX

using Plots
import Plots: px
using StatsPlots
import FreeType, FileIO

X = randn(88)
Project.toml
[deps]
ActuaryUtilities = "bdd23359-8b1c-4f88-b89b-d11982a786f4"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
FreeType = "b38be410-82b0-50bf-ab77-7b57e271db43"
ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0"

(no Manifest.toml needed; I put these in an empty folder and ran julia --project=. -e 'using Pkg; Pkg.instantiate() to recreate it)

With this I have this in my log, every time I start helix projet.jl and space+k on anything. space+k on randn works (once it warms up) but not on the imports.

~/.cache/helix/helix.log
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (0%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (1%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (1%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (2%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (3%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (3%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (4%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (5%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (5%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (6%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (6%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (7%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (8%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (8%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (9%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (10%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (10%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (11%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (12%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (12%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (13%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (14%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (14%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (15%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (16%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (16%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (17%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (18%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (18%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (19%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (19%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (20%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (21%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (21%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (22%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (23%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (23%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (24%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (25%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (25%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (26%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (27%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (27%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (28%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (29%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (29%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (30%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (31%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (31%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (32%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (32%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (33%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (34%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (34%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (35%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (36%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (36%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (37%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (38%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (38%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (39%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (40%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (40%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (41%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (42%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (42%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (43%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (44%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (44%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (45%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (45%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (46%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (47%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (47%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (48%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (49%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (49%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (50%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (51%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (51%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (52%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (53%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (53%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (54%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (55%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (55%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (56%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (56%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (57%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (58%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (58%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (59%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (60%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (60%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (61%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (62%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (62%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (63%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (64%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (64%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (65%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (66%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (66%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (67%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (68%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (68%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (69%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (69%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (70%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (71%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (71%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (72%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (73%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (73%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (74%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (75%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (75%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (76%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (77%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (77%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (78%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (79%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (79%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (80%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (81%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (81%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (82%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (82%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (83%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (84%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (84%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (85%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (86%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (86%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (87%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (88%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (88%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (89%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (90%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (90%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (91%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (92%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (92%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (93%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (94%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (94%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (95%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (95%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (96%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (97%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (97%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (98%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (99%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (99%)
helix_lsp::transport [ERROR] julia err <- "[ Info: All cache files downloaded (took 4.6s). (100%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package ActuaryUtilities (bdd23359-8b1c-4f88-b89b-d11982a786f4)
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package FileIO (5789e2e9-d7fb-5bc7-8068-2c6fae9b9549)
helix_lsp::transport [ERROR] julia err <- "[ Info: Package FreeType (b38be410-82b0-50bf-ab77-7b57e271db43) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package XLSX (fdbf4ff8-1666-58a4-91e7-1b58723a45e0)
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package ImageIO (82e4d734-157c-48bb-816b-45c225c6df19)
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package Distributions (31c24e10-a181-5473-b8eb-7969acd0382f)
helix_lsp::transport [ERROR] julia err <- "[ Info: Package DataFrames (a93c6f00-e57d-5684-b7b6-d8193f3e46c0) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package Plots (91a5bcdd-55d7-5caf-9e0b-520d859cae80)
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package Interpolations (a98d9a8b-a2ab-59e6-89dd-64a1c18fca59)
helix_lsp::transport [ERROR] julia err <- "[ Info: Will cache package StatsPlots (f3b207a7-027a-5e70-b257-86293d7955fd)
helix_lsp::transport [ERROR] julia err <- "[ Info: Indexing ActuaryUtilities... (0%)
helix_lsp::transport [ERROR] julia err <- "WARNING: Detected access to binding `LoadingBay.ActuaryUtilities` in a world prior to its definition world.
helix_lsp::transport [ERROR] julia err <- "  Julia 1.12 has introduced more strict world age semantics for global bindings.
helix_lsp::transport [ERROR] julia err <- "  !!! This code may malfunction under Revise.
helix_lsp::transport [ERROR] julia err <- "  !!! This code will error in future versions of Julia.
helix_lsp::transport [ERROR] julia err <- "Hint: Add an appropriate `invokelatest` around the access to this binding.
helix_lsp::transport [ERROR] julia err <- "To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
helix_lsp::transport [ERROR] julia err <- "[ Info: Indexing FileIO... (12%)
helix_lsp::transport [ERROR] julia err <- "WARNING: Detected access to binding `LoadingBay.FileIO` in a world prior to its definition world.
helix_lsp::transport [ERROR] julia err <- "  Julia 1.12 has introduced more strict world age semantics for global bindings.
helix_lsp::transport [ERROR] julia err <- "  !!! This code may malfunction under Revise.
helix_lsp::transport [ERROR] julia err <- "  !!! This code will error in future versions of Julia.
helix_lsp::transport [ERROR] julia err <- "Hint: Add an appropriate `invokelatest` around the access to this binding.
helix_lsp::transport [ERROR] julia err <- "To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
helix_lsp::transport [ERROR] julia err <- "[ Info: Indexing XLSX... (25%)
helix_lsp::transport [ERROR] julia err <- "WARNING: Detected access to binding `LoadingBay.XLSX` in a world prior to its definition world.
helix_lsp::transport [ERROR] julia err <- "  Julia 1.12 has introduced more strict world age semantics for global bindings.
helix_lsp::transport [ERROR] julia err <- "  !!! This code may malfunction under Revise.
helix_lsp::transport [ERROR] julia err <- "  !!! This code will error in future versions of Julia.
helix_lsp::transport [ERROR] julia err <- "Hint: Add an appropriate `invokelatest` around the access to this binding.
helix_lsp::transport [ERROR] julia err <- "To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
helix_lsp::transport [ERROR] julia err <- "[ Info: Indexing ImageIO... (38%)
helix_lsp::transport [ERROR] julia err <- "WARNING: Detected access to binding `LoadingBay.ImageIO` in a world prior to its definition world.
helix_lsp::transport [ERROR] julia err <- "  Julia 1.12 has introduced more strict world age semantics for global bindings.
helix_lsp::transport [ERROR] julia err <- "  !!! This code may malfunction under Revise.
helix_lsp::transport [ERROR] julia err <- "  !!! This code will error in future versions of Julia.
helix_lsp::transport [ERROR] julia err <- "Hint: Add an appropriate `invokelatest` around the access to this binding.
helix_lsp::transport [ERROR] julia err <- "To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.
helix_lsp::transport [ERROR] julia err <- "[ Info: Processing Distributions... (50%)
helix_lsp::transport [ERROR] julia err <- "ERROR: LoadError: UndefVarError: `Distributions` not defined in `Main.SymbolServer.LoadingBay`
helix_lsp::transport [ERROR] julia err <- "The binding may be too new: running in world age 39213, while current world is 39454.
helix_lsp::transport [ERROR] julia err <- "Hint: Distributions is loaded but not imported in the active module Main.
helix_lsp::transport [ERROR] julia err <- "Stacktrace:
helix_lsp::transport [ERROR] julia err <- " [1] load_package(c::Pkg.Types.Context, uuid::Base.UUID, conn::Base.PipeEndpoint, loadingbay::Module, percentage::Int64)
helix_lsp::transport [ERROR] julia err <- "   @ Main.SymbolServer ~/.julia/packages/SymbolServer/2jiVV/src/utils.jl:631
helix_lsp::transport [ERROR] julia err <- " [2] top-level scope
helix_lsp::transport [ERROR] julia err <- "   @ ~/.julia/packages/SymbolServer/2jiVV/src/server.jl:100
helix_lsp::transport [ERROR] julia err <- "in expression starting at /home/kousu/.julia/packages/SymbolServer/2jiVV/src/server.jl:1

It kind of sounds like LanguageServer is crashing on one of the dependencies interrupting its indexing before it can cache anything.

To test, I commented out all but one line:

Project.toml
[deps]
#ActuaryUtilities = "bdd23359-8b1c-4f88-b89b-d11982a786f4"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
#Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
#FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
#FreeType = "b38be410-82b0-50bf-ab77-7b57e271db43"
#ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
#Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
#Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
#StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
#XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0"

and now when I run helix it complains it can’t index StatsPlots or Distributions etc but it does give me docs for Statistics and (minimally) DataFrames


Adding in ActuaryUtilities

Project.toml
[deps]
#ActuaryUtilities = "bdd23359-8b1c-4f88-b89b-d11982a786f4"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
#FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
#FreeType = "b38be410-82b0-50bf-ab77-7b57e271db43"
#ImageIO = "82e4d734-157c-48bb-816b-45c225c6df19"
#Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
#Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
#StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
#XLSX = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0"

warns

WARNING: Detected access to binding LoadingBay.Distributions in a world prior to its definition world.\n"

but after it eventually loads the symbols

helix.log.1.notactuallytoml.toml (18.3 KB)

and then the space+k for docs and (in this case .+W for “Weibull”) for the autocompleter it works

If I comment in ActuaryUtilities then I also get the

WARNING: Detected access to binding LoadingBay.ActuaryUtilities in a world prior to its definition world.

and it hangs for a while. I can see in top that

/usr/bin/julia --code-coverage=none --startup-file=no --compiled-modules=existing --history-file=no --project=/home/kousu/src/helix-test3 /home/kousu/.julia/packages/SymbolServer/2jiVV/src/server.jl /home/kousu/.julia/packages/SymbolServer/2jiVV/store /tmp/vscjlsymserv-33105ea9-5f51

is chewing up CPU. Eventually the log says

helix_lsp::transport [ERROR] julia err <- "============== Startup timings ==============
helix_lsp::transport [ERROR] julia err <- "       0.0 - LS startup started (0.0s since last event)
helix_lsp::transport [ERROR] julia err <- "   0.03316 - connection established (0.03316s since last event)
helix_lsp::transport [ERROR] julia err <- "   0.36813 - (async) listening to client events (0.33497s since last event)
helix_lsp::transport [ERROR] julia err <- "   0.50132 - (async) listening to symbol server events (0.13319s since last event)
helix_lsp::transport [ERROR] julia err <- "   0.50137 - starting combined listener (5.1975e-5s since last event)
helix_lsp::transport [ERROR] julia err <- "   0.63763 - LSP/initialize (0.13626s since last event)
helix_lsp::transport [ERROR] julia err <- "     5.046 - LSP/initialized (4.4084s since last event)
helix_lsp::transport [ERROR] julia err <- "    11.048 - LSP/textDocument/didOpen (6.002s since last event)
helix_lsp::transport [ERROR] julia err <- "    14.524 - LSP/textDocument/hover (3.4759s since last event)
helix_lsp::transport [ERROR] julia err <- "    231.49 - symbols received (216.97s since last event)
helix_lsp::transport [ERROR] julia err <- "    231.52 - extended methods computed (0.024654s since last event)
helix_lsp::transport [ERROR] julia err <- "    231.52 - project deps computed (3.8862e-5s since last event)
helix_lsp::transport [ERROR] julia err <- "    231.52 - env map computed (0.00013018s since last event)
helix_lsp::transport [ERROR] julia err <- "    231.66 - initial lint done (0.14071s since last event)
helix_lsp::transport [ERROR] julia err <- "=============================================

Notice the 231.49, that’s about 4 minutes(!). I guess ActuaryUtilities just took a long time to index? Once it’s done, autocompletion works:

And for the moment of truth: if I restart Helix does the cache come back?
helix.log.notactuallytoml.toml (45.0 KB)

So weirdly it STILL says

Downloading cache files…

but also

helix_lsp::transport [ERROR] julia err ← "[ Info: Package ActuaryUtilities (bdd23359-8b1c-4f88-b89b-d11982a786f4) is cached.

and the wait for the symbols to load wasn’t nearly as long.

So I don’t know. The cache still seems not to know if it should be working, but maybe also I just was never giving it enough time to settle. If I quit before it’s done indexing everything it apparently never writes the symbol cache, which makes it hard to make partial progress.

Do you/anyone else using helix see any of this behaviour? Using LanguageServer via the vscode extension isn’t ever like this, is it?

If anyone has read this far :folded_hands: thank you!

Update: I went through Project.toml line by line adding one dependency at a time and waiting for LS to index and cache everything and now autocompletion is working on my full project. It’s still not instant, it’s about 30s+ to boot, and it still always redownloads something each time, but at least it’s usable.

helix.log
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (0%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (3%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (6%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (10%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (13%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (16%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (19%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (23%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (26%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (29%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (32%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (35%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (39%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (42%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (45%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (48%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (52%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (55%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (58%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (61%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (65%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (68%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (71%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (74%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (77%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (81%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (84%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (87%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (90%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (94%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Downloading cache files... (97%)
helix_lsp::transport [ERROR] julia err <- "[ Info: All cache files downloaded (took 2.4s). (100%)
helix_lsp::transport [ERROR] julia err <- "[ Info: Package ActuaryUtilities (bdd23359-8b1c-4f88-b89b-d11982a786f4) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package FileIO (5789e2e9-d7fb-5bc7-8068-2c6fae9b9549) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package FreeType (b38be410-82b0-50bf-ab77-7b57e271db43) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package XLSX (fdbf4ff8-1666-58a4-91e7-1b58723a45e0) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package ImageIO (82e4d734-157c-48bb-816b-45c225c6df19) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package Distributions (31c24e10-a181-5473-b8eb-7969acd0382f) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package DataFrames (a93c6f00-e57d-5684-b7b6-d8193f3e46c0) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package Plots (91a5bcdd-55d7-5caf-9e0b-520d859cae80) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package Interpolations (a98d9a8b-a2ab-59e6-89dd-64a1c18fca59) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Package StatsPlots (f3b207a7-027a-5e70-b257-86293d7955fd) is cached.
helix_lsp::transport [ERROR] julia err <- "[ Info: Symbol server indexing took 24.187181024 seconds.

:person_shrugging: :elephant:

I would like to understand what is triggering the downloads and how to stop them.

1 Like