iamhyc / Overleaf-Workshop

Open Overleaf/ShareLaTex projects in vscode, with full collaboration support.
https://marketplace.visualstudio.com/items?itemName=iamhyc.overleaf-workshop
GNU Affero General Public License v3.0
562 stars 13 forks source link

BibLatex autocompletion not working #163

Closed JotaRata closed 4 months ago

JotaRata commented 4 months ago

Describe the bug

As mentioned in #146 and #61 there should be an integrated bib reference completion in IntelliSense that uses the \bibitem items in .output/output.bbl. Yet the extension is not recognizing the entries in that file and the auto-completions don't show up after typing \cite

How To Reproduce

This is a sample of my citations.bib file:

@ARTICLE{unified_agn,
       author = {{Antonucci}, Robert},
        title = "{Unified models for active galactic nuclei and quasars.}",
      journal = {\araa},
     keywords = {Active Galactic Nuclei, Astronomical Polarimetry, Quasars, Radio Galaxies, Astronomical Spectroscopy, Bl Lacertae Objects, Blazars, Astrophysics},
         year = 1993,
        month = jan,
       volume = {31},
        pages = {473-521},
          doi = {10.1146/annurev.aa.31.090193.002353},
       adsurl = {https://ui.adsabs.harvard.edu/abs/1993ARA&A..31..473A},
      adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}

And the preamble of my Latex file:

\documentclass{article}
\usepackage{graphicx} 
\usepackage{biblatex}
\addbibresource{citations.bib}

By typing \cite{} in the editor it is expected the labels (in this case unified_agn) to show up

Environment

[Optional] Developer Logs

The extension host console is flooded with these messages

TypeError: Cannot read properties of undefined (reading 'code') at MisspellingCheckProvider.provideCodeActions (c:\Users\jjbar\.vscode\extensions\iamhyc.overleaf-workshop-0.13.0\out\intellisense\langMisspellingCheckProvider.js:102:61) at M.provideCodeActions (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:96262) at c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:125241 at Ae.s (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:120151) at Ae.$provideCodeActions (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:153:125228) at c.S (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:5505) at c.Q (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:5271) at c.M (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:4323) at c.L (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:3440) at a.value (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:2227) at o.y (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:660) at o.fire (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:877) at u.fire (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:107:14175) at a.value (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:176:8023) at o.y (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:660) at o.fire (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:82:877) at u.fire (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:107:14175) at MessagePortMain. (c:\Users\jjbar\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:176:6303) at MessagePortMain.emit (node:events:517:28) at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)
QianrenLi commented 4 months ago

Please try typing \cite{, then see if this problem solved.

JotaRata commented 4 months ago

Please try typing \cite{, then see if this problem solved.

No, that's the approach I already tried and doesn't work, also it triggers the messages in the console that are attached above.

QianrenLi commented 4 months ago

image After using the same configuration as you provide, the complemention seems to appear. Is there any thing specific in your setting?

JotaRata commented 4 months ago

I havent changed the settings of the extension, The only thing I have is the LaTeX extension by Mathematic Inc. imagen

Could it be that maybe I have disabled the specific suggestion element type in vscode settings in another profile?

JotaRata commented 4 months ago

OK fixed it by enabling "Show references" in vscode Editor > Suggest settings imagen

Screenshot showing it works now: imagen

Thanks for your time, I'm closing the issue now.