Skip to content

Example in README to toggle around insert mode is incomplete #46

Description

@Reylak

The example 3. in the README says:


  1. How can I disable the cursor when I enter insert mode and reenable it when I go in normal mode?
{
  'dgagn/diagflow.nvim',
  opts = {
    toggle_event = { 'InsertEnter' },
  },
}

I believe this is incomplete: it will only toggle diagflow when entering insert mode, but will not enable it again when leaving insert mode.

The fix is to add InsertLeave to toggle_event:

{
  'dgagn/diagflow.nvim',
  opts = {
    toggle_event = { 'InsertEnter', 'InsertLeave' },
  },
}

Note: looking at #44, it may indeed be better to have enable_event and disable_event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions