Timeline for How to set python indent offset to 2 spaces in elpy emacs?
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 14, 2022 at 22:30 | vote | accept | scribe | ||
Sep 6, 2020 at 4:06 | comment | added | scribe |
Reading here, I was able to make a file ~/.config/yapf/style and add [style] \n INDENT_WIDTH=2 to it and then the yapf formatted the files with two spaces. If you add that to your answer, I'll accept it.
|
|
Sep 6, 2020 at 3:43 | comment | added | scribe |
It's actually not me who is using yapf , it came with the package elpy . Maybe you are right and I thought about that too but then thought elpy should parse the correct settings to yapf .
|
|
Sep 3, 2020 at 5:57 | history | edited | db48x | CC BY-SA 4.0 |
added 234 characters in body
|
Sep 3, 2020 at 4:53 | comment | added | scribe |
I tried python-indent-guess-indent-offset to nil and checked the python-indent-offset to be 2! The yapf formatting is still happening with 4 spaces. There is also python-indent-guess-indent-offset-verbose which I did not change and is set to t.
|
|
Sep 3, 2020 at 3:43 | history | answered | db48x | CC BY-SA 4.0 |