combobulate icon indicating copy to clipboard operation
combobulate copied to clipboard

What is proper way to remove a default highlight rule?

Open mkleehammer opened this issue 1 year ago • 6 comments

I'm trying to eliminate the JS highlighting of "console" calls which is really distracting, but can't quite find the right point to do so.

I see the rule in the local variable combobulate-highlight-queries-default, but am not sure the right time to remove it. I've attempted:

  • Set the var before loading the JS ts mode
  • Set the var just after loading it
  • Set the var in a setup hook for JS buffers
  • In setup hook, call (combobulate-highlight-install (treesit-parser-language (car-safe (treesit-parser-list))))

What I settled on for now is to call combubulate-highlight-clear in my JS setup hook function, but that doesn't seem like the right solution. I would guess they would come back at some point.

How would you recommend removing the rule?

Also, would be possible to either remove this from the defaults? It seems a bit agressive to override users themes. Or perhaps make it easier to disable such as using an alist for the defaults too to make it easier to identify them and remove them individually?

Thanks.

mkleehammer avatar Mar 07 '24 18:03 mkleehammer

There the combobulate-after-setup-hook you can use. I'm working on making all of this much, much easier to change, though.

mickeynp avatar Mar 11 '24 06:03 mickeynp

Thanks. What is your recommended approach within the after-setup-hook other than calling clear highlights? I really just want to remove that one highlight since others could be useful ( I don't know what they are / are going to be in the future.)

mkleehammer avatar Mar 12 '24 16:03 mkleehammer

Well, it's a list, so you'd have to remove the element from it. You can also change the faces of the colours they use as a simpler workaround.

mickeynp avatar Mar 12 '24 17:03 mickeynp

@mkleehammer were you able to do it ? if so could you please share how ? I don't use combobulate with typescript because the console.log highlight

pbgc avatar Apr 19 '24 10:04 pbgc

@pbgc Sorry for the delay. I ended up adding (combobulate-highlight-clear) to my JS hook. I expected the highlighting to come back periodically but have not had any problems.

mkleehammer avatar Apr 24 '24 14:04 mkleehammer

@mkleehammer thank you!

pbgc avatar Apr 24 '24 15:04 pbgc