Closed Panossa closed 2 years ago
Update: PC restart (not only Obsidian) helped, no idea why.
Very weird. Glad it works now!
Actually, lemme just reopen that. It only ever worked after that one system restart. After I wrote my comment and closed the ticket, it stopped working when I created the next file in that vault.
And now, after a few days, I started Obsidian and still can't use Completr in that one vault. The only difference now being: if I create a new file, it stops working in ALL of my vaults.
Even if I open a brand new sandbox/help vault, install only Completr, it doesn't work.
Edit: it sounds like the plugin stops working when I create a file. That's not the case. Even if I just restart everything and open a sandbox vault, it's not working at all. I just NOTICED it after I created a new file after closing this issue.
Update: I created a few more files and suddenly while writing a note it just started working again. But it's incredibly inconsistent. Even after a restart it works now but I'm sure it'll break soon™️
Edit: restarted Obsidian, works. Created a new file, stopped working.
That's a really weird issue, I have no idea how to replicate it. I tried a few things and can't get it to not work.
What parts of Completr are you testing that don't work? All completions or just specific providers? To test if the plugin does anything you can place your cursor at the start of the file, then open the popup and you should get a front-matter
suggestion if you have that provider enabled.
My goal is to use it with frontmatter only. Of all the toggle sliders in the Completr settings I have only enabled the front matter provider enabled (and disabled "add suffix to tag completion"). Everything else is disabled.
Opening the popup at the start of a file suggests adding front-matter like it should. But then, inside the frontmatter, it doesn't provide any suggestions for tags or aliases (or even the KEYS of the frontmatter, e.g. "tags", "sources").
Using the hotkey to open the suggestions doesn't create a warning or error in the console, either.
Update: it fixed itself by doing absolutely nothing. After it broke last time I just kept Obsidian opened and watched a few videos in my browser. Then I switched back to Obsidian and the plugin works again.
Edit: I just noticed, it seems in the same time my spell checker (the built-in one from Obsidian) reset its settings. I've set it up to US English but it seems leaving Obsidian opened for a bit reverts the cashed settings back to default (which for me is German as my OS is in German) until I restart Obsidian. By cashed settings I mean Obsidian THINKS it needs to correct German words but if I actually open the settings it's still set to English. I hope that has nothing to do with the actual problem but I thought it wouldn't be bad to mention it.
I think imma keep updating this with stuff so the behavior is better documented. Just started Obsidian again, created a new file, Completr wasn't working. Added some tags myself without completion, created a new line, started typing "aliases" and on the last letter or something, suddenly, the suggestions started working again.
Then I created a new file, added frontmatter, Completr was dead again. Still no errors in the console.
Edit: I just noticed Completr works in every file except the newly created file (which I mentioned above). What the actual...?
OH MY GOD I think I found the problem! At least it's something reproduce-able!
If I create a file, Completr will suggest adding frontmatter. As long as I'm inside the frontmatter block, Completr will then stop working, UNTIL I add a line break to the last frontmatter char (-). Meaning the frontmatter needs to be "completed" by a line break for Completr to work. My newly created files all don't have multiple lines, that's why it seems to be happening.
Just to be sure I don't confuse anyone with my description:
---\n
tags: [cursor]\n
---
doesn't give me suggestions, while
---\n
tags: [cursor]\n
---\n
...does. (If \n is an actual line break - can't write those here.)
Thanks a lot for sticking around and figuring this out. Fixed in 86ba67692db887da90e44124854a0c75114f01ed. Let me know if this fully resolves all your issues with the new version.
My first tests are working so I'm going to close this issue until I find another problem like this. Thank you! :D
Heyo, I just updated Obsidian after not using it for a month or something like that, updated Completr in two of my vaults and noticed it stopped working in one of them.
The Chrome/Electron console doesn't have any warning or errors from any plugin, especially none from Completr.
Creating a new file with frontmatter, then writing "tags: " opens a suggestion dialogue in one of the vaults but not the other. Pressing the hotkey for opening the suggestion dialogue works in one but not the other. Even creating a new hotkey and testing that didn't yield better results.
Tag Wrangler version: 0.5.3, Obsidian version: 0.15.8, All other plugins disabled.