Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Remove 'plug' highlighting when the filetype changes #9

Closed
Delapouite opened this issue Oct 20, 2018 · 2 comments
Closed

Remove 'plug' highlighting when the filetype changes #9

Delapouite opened this issue Oct 20, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@Delapouite
Copy link
Contributor

The following hook adds hl to the plug keyword

hook global WinSetOption filetype=kak %{
	try %{ add-highlighter window/plug regex ^(\h+)?\bplug\b\h 0:keyword }
}

I think a hook to remove the hl is missing. Something like:

hook  global WinSetOption filetype=(?!kak).* %{ remove-highlighter window/plug }
@andreyorst
Copy link
Owner

Never thought of it actually. Why would one want to change kak filetype while editing configuration files, or set kak filetype for a non-configuration file? I'm not against of adding such hook, just wondering.

@andreyorst
Copy link
Owner

Fixed in #12

@andreyorst andreyorst added the enhancement New feature or request label Nov 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants