Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is proper way to remove a default highlight rule? #90

Open
mkleehammer opened this issue Mar 7, 2024 · 6 comments
Open

What is proper way to remove a default highlight rule? #90

mkleehammer opened this issue Mar 7, 2024 · 6 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@mkleehammer
Copy link

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.

@mickeynp
Copy link
Owner

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

@mickeynp mickeynp added enhancement New feature or request question Further information is requested labels Mar 11, 2024
@mkleehammer
Copy link
Author

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.)

@mickeynp
Copy link
Owner

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.

@pbgc
Copy link

pbgc commented Apr 19, 2024

@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

@mkleehammer
Copy link
Author

@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.

@pbgc
Copy link

pbgc commented Apr 24, 2024

@mkleehammer thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants