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

ghchoi
  • 4,812
  • 4
  • 30
  • 53
  • 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. – lawlist Jul 20 '17 at 15:00

3 Answers3

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

Tim Miller
  • 566
  • 5
  • 17
7

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

pdw
  • 8,359
  • 2
  • 29
  • 41
  • 1
    This should be the preferred way to disable the indentation markers over the Tim Miller's answer. – Thomas Mar 02 '20 at 09:58
  • 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. – peterhil Aug 25 '20 at 21:06
  • 1
    `(setq elpy-modules (delq 'elpy-module-highlight-indentation elpy-modules))` – ybendana Jul 15 '21 at 01:07
-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

Passerby
  • 1
  • 1