Skip to content

Different trigger_events for different FileType #80

@Andrew15-5

Description

@Andrew15-5

I want to have this for all file types:

auto_save.setup {
  execution_message,
  trigger_events = { "InsertLeave", "TextChanged" },
}

But this for typst:

auto_save.setup {
  execution_message,
  trigger_events = { "InsertLeave", "TextChanged", "TextChangedI" },
}

I can't get buffer's FileType on Neovim initialization, I can't re-setup the config. Can I check which event was triggered in the condition function? This way, I can cancel TextChangedI event for every non-typst buffer. But I would prefer per-FileType trigger_events.

Either way, can I somehow solve the problem now, or is this a feature request?

P.S. I still use init.vim and have almost 0 knowledge of Neovim's Lua API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions