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

Add auto complete for citations #354

Merged
merged 4 commits into from
Nov 20, 2023

Conversation

Enter-tainer
Copy link
Collaborator

@Enter-tainer Enter-tainer commented Nov 12, 2023

fix #157

There are mainly 3 changes:

  1. Compile source to document even if no export is required.
  2. Use Arc<Document> to avoid heavy clones
  3. Add a document field to TypstServer and update it when compiling success.

image

src/server/lsp.rs Outdated Show resolved Hide resolved
@Enter-tainer
Copy link
Collaborator Author

a kind ping @nvarner

This PR enables richer diagnose information and frame-based auto completions. This should make the auto completion in lsp the same level as the official webapp 🚀

@Enivex
Copy link

Enivex commented Nov 15, 2023

Does this also add completion for references (to labels in the document), or just citations (to elements in the bibliography)?

@Enter-tainer
Copy link
Collaborator Author

Does this also add completion for references (to labels in the document), or just citations (to elements in the bibliography)?

i think it should be all labels. previously lsp doesn't pass enough info(compiled frames) to typst-ide so the auto completion is sub optimal

@Enter-tainer
Copy link
Collaborator Author

Hi @nvarner , can you take a look at this when you have time?

@nvarner
Copy link
Owner

nvarner commented Nov 20, 2023

Sorry, last few weeks have been packed. Taking a look now.

@nvarner nvarner merged commit 85619f6 into nvarner:master Nov 20, 2023
5 checks passed
@nvarner
Copy link
Owner

nvarner commented Nov 20, 2023

But it looks great! Thanks @Enter-tainer!

@Idobenhamo
Copy link

@Enter-tainer does it support also the Hayagriva yaml files?
@nvarner when the next release with this PR is expected?
Thanks you for this amazing tool :D

@Enter-tainer
Copy link
Collaborator Author

@Enter-tainer does it support also the Hayagriva yaml files?
@nvarner when the next release with this PR is expected?
Thanks you for this amazing tool :D

i havent try it but i think yes. i tested it on bib files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Autocompletion of citations
4 participants