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

Autocomplete Suggestions never pop up, even when clicking ctrl+space #5

Open
linamnt opened this issue Feb 2, 2019 · 23 comments
Open

Comments

@linamnt
Copy link

linamnt commented Feb 2, 2019

I just installed this and there seem to be no errors during installation. It just doesn't work for me. I also updated VSCode in case it was an issue with versions.Any ideas why this isn't working? I have the .bib file in the same folder so I have

bibliography: [./library.bib]

and also set a default .bib file just in case.

This is the output log so it seems to see my .bib file

Parsed 235 .bib entries from /home/../library.bib.
Looking for .bib file:/home/../library.bib.
Found .bib file /home/../library.bib.
.bib file /home/../library.bib. is already being watched.

Thoughts? Thanks for making this package.

@notZaki
Copy link
Owner

notZaki commented Feb 2, 2019

That sounds troubling, but at least the log says that the file is being parsed.
There's a couple things that could be tried

  • Try changing the PandocCiter.VewType to 'browser' instead of 'inline'. The two types use slightly different code, so maybe it's an issue with intellisense.
  • Try using a simple .bib file (with fewer references). I use this sample bib file. Maybe one of the entries in the large bib file is confusing the extension.

If it still doesn't work, then I'll add a few more log events so that we can figure out whats going wrong.

@linamnt
Copy link
Author

linamnt commented Feb 11, 2019

I tried the sample bib file and it still does not work, neither does browser work. Sorry for the trouble!

@notZaki
Copy link
Owner

notZaki commented Feb 11, 2019

I can't reproduce the problem.
The only cases I'm aware of when suggestions won't trigger is:

  1. File is not recognized as markdown or rmd
  2. File is not saved on disk
  3. Config "editor.suggestOnTriggerCharacters" is set to false

Anyways, I added a new log event in the recent release (0.3.4) which might help us figure out what's going wrong.
Here's the steps I tried to verify that the extension is working. It'll be helpful if you could repeat them and point out where we get different results.

  • Disable the default .bib -- either by removing it from the configuration, or setting PandocCiter.UseDefaultBib to false. Reload vscode after this step so that any loaded bib keys are wiped clean.
    • Also make sure that the PandocCiter.ShowLog config is set to true (I ought to make it true by default)
  • Create and save a blank markdown file
  • Open the blank markdown file
    • Output log should state: PandocCiter is now activated
      • If not, verify that the file syntax is set to markdown in the bottom-right
        image
  • Type @ in the markdown file
    • Output log should state: Showing 0 suggestions
  • Type the YAML header in the markdown file:
    ---
    bibliography: [./library.bib]
    ---
    
    • Output log should state whether a bib file was located and, if yes, how many citations were parsed
  • Type @ in the markdown file again
    • Output log should state: Showing <SomeNumber> suggestions

@vjagodnik
Copy link

Had the same issue today.
Solved it using recommended procedure but had to install version 0.3.4

@notZaki
Copy link
Owner

notZaki commented Nov 25, 2019

@vjagodnik
That's strange, but perhaps not surprising since version 0.4 is more picky.

If you have time, could you tell me what the output log shows when using version 0.4? Specifically: does it parse the bib file and whether it mentions anything when trying to add a citation.

@vjagodnik
Copy link

No. It just shows the words used in md file.
At this very moment, I cannot use the 0.3.4 neither. I think that this has something to do with the link to bibliography file.

@vjagodnik
Copy link

Ok, this is somewhat frustrating now.
Now it appears that the latest version, 0.4.1 works perfectly.
I apologise for this confusion, but earlier it did not work for me.

@notZaki
Copy link
Owner

notZaki commented Nov 25, 2019

No worries. It's great to hear that it works!

@joezhouchenye
Copy link

I have the same problem and I follow the suggestions you give above @notZaki . It turns out to be a very strange problem. I started from a fresh install of vs code on mac os and pandoc citer is the only plugin I installed. I followed all steps until the step to open a blank markdown file and PandocCiter is now activated never showed up. However, when I manually clicked the file syntax in the bottom-right and choosed markdown(the file syntax had already been markdown, just choose manually again), everything works fine.

@notZaki
Copy link
Owner

notZaki commented Mar 9, 2020

Thanks for the insight @joezhouchenye
It is indeed odd that the extension doesn't activate right away on a blank markdown file. I likely won't have time to look into this until the summer, but hopefully your advice of manually selecting the syntax is useful for anyone encountering the problem.

@okbel
Copy link

okbel commented Apr 5, 2020

Same issue here! LMK if there is anything I can do to help

@ilcpm
Copy link

ilcpm commented Apr 22, 2020

    "[markdown]": {
        "editor.quickSuggestions": true,
    },

by default, markdown won't provide any suggestion untill this setting is turned up.
hope this can help you.

@ilcpm
Copy link

ilcpm commented Apr 22, 2020

also, remember to add [] outside of the bib file like bibliography: [1.bib]
this is the problem I meet...

@notZaki
Copy link
Owner

notZaki commented Apr 22, 2020

Thanks for the tips @ilcpm!

@okbel, what does the output log show? That would help narrow down whether the issue is with intellisense or with finding/parsing the bib file.

I will add that I have recently noticed intellisense not working for citations on a few occasions. It seems to happen after every vscode update, but I haven't yet been able to figure out why. The log says that the extension was loaded and that the bib file was parsed, but the citations still don't show up.

Reloading the window (or closing/reopening vscode) seems to fix it.

@nherbaut
Copy link

adding the configuration @ilcpm suggested and restarting VSCode worked for me on v0.70

@prakaa
Copy link

prakaa commented Jul 9, 2020

Configuration @ilcpm suggested also worked for me

@THyanNK
Copy link

THyanNK commented Feb 27, 2023

@ilcpm is right, just add the code to your settings.json and restart, everything is right now.

@THyanNK
Copy link

THyanNK commented Feb 28, 2023

Something strange happens. When I restart my vscode, the code by @ilcpm was replaced by

"[markdown]": {
        "editor.quickSuggestions": {
            "comments": "on",
            "strings": "on",
            "other": "on"
        }
    },

and the PandocCiter stopped working.
However, when I add it again in another place, the problem is solved.

@mgcooper
Copy link

I am having the same issue with @ autocomplte not working using v0.9.3 on macos. I disabled almost every extension in my workspace (left the color themes and some others active). I get basically the same behavior as others - output log says the .bib file is found and parsed, but @ does not trigger anything. Tried a .bib file with one single entry and a more complex one. Like @THyanNK mentioned, the boolean is no longer an option with "[markdown]": {"editor.quickSuggestions": ... so I tried adjusting the three available options and it didn't matter. Hope someone can find a solution!

@THyanNK
Copy link

THyanNK commented May 16, 2023

I am having the same issue with @ autocomplte not working using v0.9.3 on macos. I disabled almost every extension in my workspace (left the color themes and some others active). I get basically the same behavior as others - output log says the .bib file is found and parsed, but @ does not trigger anything. Tried a .bib file with one single entry and a more complex one. Like @THyanNK mentioned, the boolean is no longer an option with "[markdown]": {"editor.quickSuggestions": ... so I tried adjusting the three available options and it didn't matter. Hope someone can find a solution!

Just add it again
Now my settings.json looks like this

"[markdown]": {
    "editor.quickSuggestions": {
        "comments": "on",
        "strings": "on",
        "other": "on"
    }
},
"[markdown]": {
    "editor.quickSuggestions": true,
},

@mgcooper
Copy link

I am having the same issue with @ autocomplte not working using v0.9.3 on macos. I disabled almost every extension in my workspace (left the color themes and some others active). I get basically the same behavior as others - output log says the .bib file is found and parsed, but @ does not trigger anything. Tried a .bib file with one single entry and a more complex one. Like @THyanNK mentioned, the boolean is no longer an option with "[markdown]": {"editor.quickSuggestions": ... so I tried adjusting the three available options and it didn't matter. Hope someone can find a solution!

Just add it again Now my settings.json looks like this

"[markdown]": {
    "editor.quickSuggestions": {
        "comments": "on",
        "strings": "on",
        "other": "on"
    }
},
"[markdown]": {
    "editor.quickSuggestions": true,
},

I should have been more specific about what I tried. Basically I tried everything in the three separate issues on this topic, including the hack you suggested to put the old and new editor.quickSuggestions syntax in settings.json, but it did not work. Referring to the suggested test steps, at the point where typing @ should bring up Showing suggestions I get nothing.

Some things I tried:
Deactivated iterm2 hotkey mapped to ^space (if active, opens a new iterm2 window)
Checked all keyboard shortcuts in Preferences (none were mapped to ^space)
Reinstalled PandocCiter
Restarted vscode
Tried it all again
Closed all other open vscode windows
Tried it all again
Restarted computer
Tried it all again
Deactivated every extension except PandocCiter and IntelliCode
Tried it all again
Commented out every setting in global settings.json
Tried it all again

Note that "Tried it all again" means using the two editor.quickSuggestions syntaxes, using a simple test.bib file with only one entry, reloading vscode, opening a new md file, typing @, then adding bibliography header, typing @, and so on (all the various suggestions).

One thing I noticed that I don't understand is the following setting in my global user settings (not workspace):
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",

Hovering over this the popup says "automaticallyOverrodeDefaultValue: (DO NOT SET THIS MANUALLY) IntelliCode will set this to record that configuration has been automatically modified to override a default value"

I have no idea when or why this was set automatically by IntelliCode or if this is relevant at all, but as mentioned, I disabled my entire settings.json file and did not work.

@somelinguist
Copy link

I'm having what I think may be the same issue. If I set PandocCiter.ViewType to inline, I get no completion suggestions for citations, even when manually triggering the suggestions popup. If I set PandocCiter.ViewType to browser, however, it works fine.

I do get other inline suggestions from other extensions, etc. without issue, however.

@somelinguist
Copy link

I just had a chance to try this out on a Windows machine tonight, and I do get completions using the inline view setting there. However, I still get nothing on macOS. I'm using the latest versions of VSCode and the extension on both. I've tried the logging, and it reports that it's showing the correct number of entries/results, but the popup never shows.

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

No branches or pull requests