This repository has been archived by the owner on Sep 22, 2024. It is now read-only.
Choose when to highlight more dynamically #260
Labels
bug
Something isn't working
good first issue
Good for newcomers
prio:high
High priority (user-visible impact, etc.)
Milestone
I currently get
unsupported language: <lang>
errors specifically when I first open a supported file, then open an unsupported file in a new window with:new edit <file>
. The same error as can be achieved by changingkts_lang
to some nonsense.Issue seems to be that a
highlight-enable
request is sent for the new client with the language of the previous window. A correct request is sent and denied right after, but by then highlighting has already been enabled. I think the more general issue is that we decide whether to highlight or not when a window is opened, and then never again.A more reliable behavior might be to re-decide whether to highlight a buffer whenever its
kts_lang
is changed. For this to work, a hook would need to updatekts_lang
wheneverfiletype
is changed. By removing this specific hook, you could then also get dynamic control over the highlighting thoughkts_lang
.The text was updated successfully, but these errors were encountered: