Fork me on GitHub
#emacs
<
2016-08-04
>
jan.zy13:08:06

How can I enable syntax highlighting in whole length of a line

jan.zy13:08:38

These magenta characters at the end of long lines are confusing

jan.zy13:08:41

It’s Prelude

niamu13:08:05

Looks like you have some rules set up for colors past the 80 character limit.

jan.zy13:08:19

yeah, default Prelude rules 🙂

niamu13:08:22

My guess is that if you simply redefine it to not include lines-tail it will solve your problem.

lvh13:08:56

you probably want to keep the other ones 🙂

lvh13:08:16

also you can reconfigure the font locking to just do a background instead of also front

lvh13:08:44

Probably some useful emacs to learn: type such a long line, go on the thing you don’t like how it’s colored

lvh13:08:47

M-x describe-char

lvh13:08:02

There are text properties here:
  cider-locals         [Show]
  face                 (whitespace-line)
  fontified            t
  help-echo            cider--help-echo

lvh13:08:15

click on whitespace-line, it will take you to the part where you can configure it 🙂

lvh13:08:18

it is probably themed

jan.zy13:08:19

@niamu:

(setq whitespace-line-column 160)
fyi, it didn’t help

bozhidar13:08:44

seems you don’t really need me

lvh13:08:45

@jan.zy: that is not the part you want to configure (also probably not setq)

lvh13:08:13

if you just want to see it go away, M-x whitespace-mode, but as we discussed some parts are useful 😉

jan.zy13:08:20

I am pretty sure that there is one var where I can pick another number

jan.zy13:08:04

ok, I am in a whitespace-line

lvh13:08:15

if you just want the whitespace highlighting for long lines to be less obtrusive, change the face; if you don’t want it at all, change what whitespace-mode highlights on, if you actually just want it to complain at 160….

jan.zy13:08:17

Face: whitespace-line (sample) (customize this face)

Documentation:
Face used to visualize "long" lines.

See `whitespace-line-column'.

Defined in `whitespace.el'.

           Family: unspecified
          Foundry: unspecified
            Width: unspecified
           Height: unspecified
           Weight: unspecified
            Slant: unspecified
       Foreground: #DC8CC3
DistantForeground: unspecified
       Background: #3F3F3F
        Underline: unspecified
         Overline: unspecified
   Strike-through: unspecified
              Box: unspecified
          Inverse: unspecified
          Stipple: unspecified
             Font: unspecified
          Fontset: unspecified
          Inherit: unspecified

[back]

bozhidar13:08:25

yeah, this is what you want to change

lvh13:08:29

“customize this face"

bozhidar13:08:36

maybe you even want to disable this

jan.zy13:08:47

I just want to disable it

bozhidar13:08:49

basically you just need a setq in your personal config

bozhidar13:08:01

or you can also disable whitespace mode

lvh13:08:07

@jan.zy: entirely, or just for long lines

lvh13:08:27

@bozhidar: I would expect that to live in customize

jan.zy13:08:47

just for long lines

bozhidar13:08:05

it lives there, but I never use customize

bozhidar13:08:16

I hate its horrible UI

bozhidar13:08:31

and prefer to simply set stuff with setq

jan.zy13:08:54

so if i want to disable whitespace highlighting for long lines only then I should customize the whitespace-line face?

jan.zy13:08:26

just making sure if i understood you correctly

lvh13:08:42

@jan.zy: No; I thought what you were asking was about not breaking syntax highlighting

lvh13:08:55

if you just want it to be e.g. a lighter background, but still tell you, then you want to customize the face

jan.zy13:08:19

ah, i see the difference.

lvh13:08:20

if you just want to disable that portion of whitespace-mode, see bozhidar’s link, or customize that

jan.zy13:08:39

bozhidar’s link tells how to disable whitespace mode completely and i would like to disable only this one feature 🙂

jan.zy13:08:56

ok, I’ll just take a closer look at the source code

jan.zy13:08:04

ahh

(setq whitespace-line-column 1000)
this one works, I just had to reload a file

jan.zy13:08:09

thanks for help !

lvh13:08:32

@bozhidar: I wonder if that’s why I can’t seem to get customize to actually honor my customization for that face

lvh13:08:55

oh, wait, you don’t set whitespace-line-face

bozhidar13:08:58

@jan.zy: you could have also re-evaluated this sexp with C-M-x

jan.zy13:08:24

I did that but I had to reload the file anyway

lvh13:08:53

I go into customize, change the face, save, nothing changes, close customize, go back to the highlighted char, describe-char — customize has the foreground color in the face again

lvh14:08:47

huh, I didn’t realize themes could take precedence over customizations

lvh14:08:59

I mean, apart from the obvious “themes are lisp code so they do whatever they want"