mickeynp / combobulate

Structured Editing and Navigation in Emacs with Tree-Sitter
GNU General Public License v3.0
945 stars 54 forks source link

combobulate-python conflicts with which-key #77

Open jeff-phil opened 10 months ago

jeff-phil commented 10 months ago

When using combobulate-python the pop-up for a which-key prefix does not always show up.

Steps to reproduce:

  1. Open a python file with combobulate and which-key enabled.
  2. Type a few letters such as prin, pause for 1 second, and then type C-c for the mode-specific-map.
  3. Notice which-key popup does not appear.
  4. Now go to a new blank line, repeat step 2 above, and notice which-key popup does appear.

The problem is this-command on Line 147 of combobulate-python.el is being set, and then Line 2685 of which-key.el sees the this-command and assumes there is an active command execution and then won't show the popup.

I thought (read: assumed) this-command was meant to be a transactional indicator for other packages to observe or react to a current running command in a package.

Since it looks like it may be only used internally by combobulate-python, do you think using local variables (combob-this-command & combob-last-command) would be better?


On a side-note, turning off combobulate-mode for does not reset back indent-region-function variable.

mickeynp commented 10 months ago

Altering this-command is perfectly fine. It's there so combobulate can tell when you tab multiple times in a row. However, I do intend to move it to using the proffer system that other parts of Combobulate uses, so it will eventually be replaced.

On a side-note, turning off combobulate-mode for does not reset back indent-region-function variable.

Thanks for telling me!