How to Disable Emacs elpy Vertical Guide Lines for Indentation?
Asked Answered
C

3

17

I am setting Emacs for python development.

So I installed elpy.

But I do not like vertical guide lines for indentation.

How can I disable it or change its color?

enter image description here

Corneliuscornell answered 20/7, 2017 at 12:1 Comment(1)
It is probably a minor mode in addition to elpy that causes Emacs to display vertical guides. Try and figure out what minor modes are active, and then you'll know which one to disable to turn off the vertical guides. I don't know if you can easily type while in elpy something regular such as M-x describe-mode or C-h m to display the minor modes. If that doesn't work, perhaps while in elpy you can evaluate (describe-mode) if the above doesn't work.Belding
C
20

You can disable highlight-indentation-mode for elpy-mode, by adding the following code to your emacs initialization.

(add-hook 'elpy-mode-hook (lambda () (highlight-indentation-mode -1)))

EDIT: changed nil to -1

Source

Clear answered 20/7, 2017 at 19:41 Comment(2)
I added the line to ~/.emacs.d/init.el, however, it still shows vertical guidelines...Corneliuscornell
Change nil to a negative integer -- e.g., -1Belding
B
7

You can customize the variable elpy-modules to disable the "display indentation markers" module.

Bernice answered 9/9, 2019 at 9:28 Comment(3)
This should be the preferred way to disable the indentation markers over the Tim Miller's answer.Spectrometer
You can get the current value of elpy-modules with M-x describe-variable RET elpy-modules (or C-h v elpy-modules) and set it in your configuration or with customize.Playmate
(setq elpy-modules (delq 'elpy-module-highlight-indentation elpy-modules))Periphrasis
G
-1

M-x customize-face

In the minibuffer enter: highlight-indentation-face

Now you can disable or change as you see fit.

Alternatively, place the cursor into any of the highlighted indentation bars then

M-x customize-face

The argument in the minibuffer should default to the proper value

Greenlee answered 28/9, 2018 at 16:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.