Skip to content

Corfu: When in prog-mode indenting with tab does not work #7767

@Schievel1

Description

@Schievel1

I confirm that...

  • I have searched the issue tracker, documentation, FAQ, Discourse, and Google, in case this issue has already been reported/resolved.

  • I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.

  • The issue can be reproduced on the latest available commit of Doom.

  • The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)

Expected behavior

In company-mode pressing TAB when e.g. c-mode is active and in insert-state will indent the line, unless it is already indented to the right position, the it will start company-complete.
This seems to depend on the setting of tab-always-indent.

Current behavior

When I activate the corfu module instead (and deactivate the company module) TAB always tries to start completion-at-point (it seems, it says No match in the minibuffer) regardless of the indentation of the line.

Being in normal-state indents the line like it should be.
Also (setq c-tab-always-indent nil) does not seem to have an effect at all. Normally this would insert actual tabs if the point is at the end of the line.

Steps to reproduce

  1. install corfu module
  2. open a .c file
  3. go to a line which isn't indented correctly
  4. press tab

I also changed config.el from the company module and set tab-always-indent in there to nil, but that doesn't do the trick.
Also setting that in c-mode hook or corfu-mode-hook does not work.

System Information

https://pastebin.com/xHcHEWhW
Yes I know this is Emacs 29.50, but I can reproduce on a plain Emacs 29 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:regressionA bug introduced in a recent and unreleased changemodule:completion/corfumodule:config/defaultPertains to Doom's :config default modulere:keybindsChanges to or discussion about Doom's keybinds

    Type

    No type

    Projects

    Status

    Resolved

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions