Closed alw-personal closed 1 year ago
This seems to be a bug related to vscode. I cannot find the root cause. @jlelong may you please take a look when there's time?
I've traced down to provideCompletionItems
function in completion.ts
. The comma ,
can trigger population of both citation and reference suggestions, returned in provideCompletionItems
. However, citation suggestions will show a list of candidate, while references cannot although suggestions were successfully provided. I can't see if there are any hidden functions after provideCompletionItems
but before showing the candidate list.
I would not say this is a bug as I think it has never worked. This is more like a good feature request.
There is indeed a hidden filtering mechanism after provideCompletionItems
returns handled directly by vscode and we have very little if no control on it. The filtering mechanism uses the range
field of the return completion items if it is defined. Here is the code used for citation completion to support completion after a comma
I will implement this today.
Currently, reference completion explicitly sets range
to start right after the opening {
See this very good post explaining the filtering mechanism.
Wow! Many thanks for the very speedy implementation.
Preliminary questions [Required]
Disable all the other extensions except for LaTeX Workshop, restart VS Code, and check that you still see this issue. [Required]
You still see this issue?: Yes
Make sure to visit the wiki FAQ before filling an issue.
You visited the wiki?: Yes
If your issue is with compiling a document (not having to do with finding the root file of a project), check first that you can compile manually.
You can compile a TeX document manually?: N/A (but yes can compile)
Describe the bug [Required]
Autocomplete does not list references after first autocompleting first reference in \cref.
To Reproduce
Steps to reproduce the behavior:
.tex
file, create two or more labels, e.g.,\label{thm:1}
and\label{thm:2}
\cref{th}
to trigger autocomplete. Autocomplete showsthm:1
andthm:2
.thm:1
from list,th
Expected behavior
Autocomplete shows
thm:1
andthm:2
Logs [Required]
LaTeX Workshop Output [Required]
Developer Tools Console [Required]
Screenshots
Desktop [Required]
Additional questions
Are you using VSCodium?
No
Are you using the Snap or Flatpack versions of VS Code?
No
Are you using LaTeX Workshop with VS Code Remote?
No
If the answer is Yes, please write which one you are using. Write the versions of the remote extension.
Additional context
Add any other context about the problem here.