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

[Discussion] Unicode preview? #28

Closed
clason opened this issue Jun 26, 2019 · 4 comments
Closed

[Discussion] Unicode preview? #28

clason opened this issue Jun 26, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@clason
Copy link
Contributor

clason commented Jun 26, 2019

Here's a far-out question (and feel free to close if it's too far out): I'm using (neo)vim, a text-based editor, so the markdown-based LaTeX preview isn't really helpful for me. Would it be possible to (optionally, e.g., with a command line flag) offer unicode preview for equation hover? There are some converters out there that can convert LaTeX to unicode, e.g.,

Or at least for the documentation of commands (e.g., α for \alpha)?

(On a related note, have you seen https://tectonic-typesetting.github.io? Looks like a TeX engine written in Rust, which could be useful for preview features in general.)

@pfoerster pfoerster added the enhancement New feature or request label Jun 26, 2019
@or17191
Copy link
Contributor

or17191 commented Aug 17, 2019

Hey,

I've started working on a PR for this issue, but I need some help.
The images are saved in a JSON file, so it seems that adding the Unicode representation of commands to that file is the right way to go. But, that file is not under version control, and I don't know how to update it. Does anyone know how to update that file?

Also, I've pushed the branch to here, and since I'm a rust and texlab novice I would appreciate your input.

@efoerster
Copy link
Member

Thanks for your help. The data.json file is auto-generated with the help of a Python script. You should add the data to the script, we can then upload a new version. I think the best way to implement this is to add a glyph field to the Command class. If you need data, I suggest to look into the unimathsymbols.txt data set.

In the language server, we should place the glyph always in the detail field of the CompletionItem. This should simplify things greatly and VS Code users would benefit from this too.

@efoerster
Copy link
Member

@or17191 We tested your code and it works fine. So, we merged it into the master.
We will push a new release soon.

@clason
Copy link
Contributor Author

clason commented Sep 21, 2019

I'm closing this for now since the main issue (completion documentation for commands) is fixed, and anything beyond that doesn't seem reasonable at the moment.

@clason clason closed this as completed Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants