We’d like to implement autocomplete, just like in Julia, of unicode characters in typst VSCode extension. Could you point me to how this implementation is done? Is it in LanguageServer.jl or is it done in Julia itself?
PS. Do check out typst. It is a modern alternative to LaTeX. It is pretty nice.
Yes, this is implemented as part of LanguageServer.jl. I won’t recommend looking at the implementation though, it’s not super easy to follow.
I’d recommend exporting the completion map in REPL.REPLCompletions.latex_symbols (and REPL.REPLCompletions.emoji_symbols if you’re interested in emojis) and injecting them into the typst-lsp completion response.
You’ll likely need to do some fuzzy filtering of the potential matches in the LS based on the word under the cursor; we’re just using REPL.fuzzyscore with an arbitrary cutoff for that.