copilot.el icon indicating copy to clipboard operation
copilot.el copied to clipboard

Cannot get copilot to use 4 spaces to indent Python

Open kynnjo opened this issue 7 months ago • 8 comments

I have run all of the following:

    (setq python-indent-offset 4)
    (add-to-list 'copilot-indentation-alist '(prog-mode 4))
    (add-to-list 'copilot-indentation-alist '(python-mode 4))
    (setq-default indent-tabs-mode nil)

(My tab-width variable is set to 8, and that is where I want to keep it. Since I don't want TABs in my Python code, at all, this setting should not matter.)

To no avail: all the code that Copilot proposes still uses an 8-space indentation.

What else must I do to get Copilot to use 4-spaces/level for indenting Python code?

kynnjo avatar Jun 17 '25 14:06 kynnjo