rizerphe / obsidian-companion

Autocomplete your obsidian notes with AI, including ChatGPT, through a copilot-like interface.
MIT License
232 stars 27 forks source link

question - How to invoke the completion of text? #1

Open erauner12 opened 1 year ago

erauner12 commented 1 year ago

Sorry this might be a dumb question but how do you actually complete the sentence when the suggestion comes up? I tried tab (like in vscode) but it does not seem to work?

I see in your gif example on the readme that you are able to complete one word at a time?

https://www.loom.com/share/a61b1fb5a2dc429eb7db74c970267d17

rizerphe commented 1 year ago

It should work with the tab key; that's what saminzadeh defined in codemirror-extension-inline-suggestion; I should have specified it in the documentation, sorry. The only reason I can think of for why it wouldn't work is that you have tab already configured to do something? I don't know; for me tab works fine, even after a space. Maybe this is an issue of us using different platforms, as I have only tested this on linux? I'm not at all sure. Can you confirm whether the issue is still there in a new vault?

erauner12 commented 1 year ago

So I just tested on a brand new vault, with nothing in it. And it worked as expected. So there must be something in my vault that is changing the behavior of using the indent/tab key. Will look for what that might be.

erauner12 commented 1 year ago

Ah I think found the culprit after disabling all plugins and testing the completion functionality with one plugin on at a time. This seems to be the plugin that is conflicting.

https://github.com/deathau/cm-typewriter-scroll-obsidian

It was not immediately intuitive to me that this would have been what broke it? Is there anything about this plugin that stands out to you?

rizerphe commented 1 year ago

They are also implementing their functionality via a codemirror extension, so it is possible that there is a conflict in there somewhere, I'll look into it, thank you

rizerphe commented 1 year ago

Finally, looked a bit into it. Seems like the typewriter scroll plugin is triggering an extra view update every time you type anything, which, similar to moving your cursor, clears the suggestion state. I'll see whether I can find any good solution, because I really don't like the idea of just waiting a bit before showing the suggestion, and that's the only fix that seems to make sense right now.

Aentonas commented 9 months ago

I found that the plugin Latex Suite is also causing the same problem. Is there a fix for this yet?

j-finger commented 5 months ago

I use latex suite too and its breaking. Latex suite is an essential plugin for me I'm afraid