Skip to content

Allow selection_modes logic like nvim-treesitter-objects #1988

@rainerborene

Description

@rainerborene

Contributing guidelines

Module(s)

mini.ai

Description

I'm having a hard time migrating from nvim-treesitter-objects to mini.ai with gen_spec.treesitter generator. I can't find a way to set the selection_modes without changing the mini.ai text object implementation itself.

select = {
  enable = true,
  lookahead = true,
  keymaps = {
    ["af"] = "@function.outer",
    ["if"] = "@function.inner",
    ["am"] = "@class.outer",
    ["im"] = "@class.inner",
    ["ar"] = "@block.outer",
    ["ir"] = "@block.inner",
  },
  selection_modes = {
    ["@parameter.outer"] = "v",
    ["@function.outer"] = "V",
    ["@class.outer"] = "V",
    ["@block.outer"] = "V",
  },
},

How can I set the selection mode in mini.ai in a simpler way like the above setup syntax?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions