Pierrad / obsidian-github-copilot

A bridge between Obsidian and Github Copilot
Apache License 2.0
155 stars 10 forks source link

"Tab" key Not Working when cursor in Bullet Point #38

Open OdyAsh opened 2 months ago

OdyAsh commented 2 months ago

Describe the bug If I assign any "Tab" related key to "Accept Suggestion" HotKey, it doesn't get registered when the cursor is on a bullet point or a numbered list.

To Reproduce Steps to reproduce the behavior:

  1. Setup the "Accept Suggestion" HotKey to any "Tab" related key
  2. Make the mouse's cursor stand on any bullet point or numbered list
  3. Wait for a suggestion to pop-up
  4. Click Tab
  5. See that the text is not accepted.

Expected behavior The text to be accepted.

Obsidian and environment (please complete the following information):

weber8thomas commented 2 months ago

Same issue on MacOS Sonoma

Pierrad commented 2 months ago

Hi @OdyAsh,

Do you have any special plugins? Some users has the same problem and it was always related to other plugin interfering with the key mapping (since 1.0.6, before that it was buggy but you're on 1.0.11 so you should be good)

OdyAsh commented 2 months ago

Hi there!

I have a lot of plugins actually 😅, but I checked the hotkeys menu and didn't see any overlapping hotkeys with the "Tab" key. Moreover, I disabled the plugins which would logically cause an issue (Text editor and Code Editor Shortcuts), yet the issue persists :[

My plugins for reference:

image

image

image

image

erik-buchholz commented 1 month ago

@OdyAsh I had exactly the same issue. Then, I deactivated all other plug-ins (except this Github Copilot) and activated them one by one to find the culprit. Now, all my plug-ins are activated again and that "Tab" completion works even in lists. I restarted Obsidian multiple times, and it still works. Maybe this will do the trick for you, too. Or maybe "Reload Plugins" in the settings is already sufficient to fix the bug.

TL;DR: Deactivating and re-activating all other plug-ins fixed the problem.

jaquesgrobler commented 4 weeks ago

More specifically, Outliner was the culprit for me - I deactivated and re-activated 'Outliner' and now tab works correctly for accepting completions as with @erik-buchholz solution. HTH

erik-buchholz commented 4 weeks ago

@jaquesgrobler I can confirm that Outliner is causing the problem. Unfortunately, the bug reappears every other day, but reactivating Outliner resolves it. Looking @OdyAsh screenshots, he also uses Outliner, so this is most likely the cause.

Right now, the bug isn't occurring on my system, so I cannot confirm it, but the Outliner has an option to "Enhance the Tab key" in the plug-in settings. Potentially deactivating this feature might permanently resolve the problem.

Pierrad commented 3 weeks ago

Hi, thanks for your investigation, I will keep this issue open for potential new people.