Skip to content

feature: Expose spellcheck function #954

@SandyJackson

Description

@SandyJackson

Did you check the docs?

  • I have read all the which-key.nvim docs

Is your feature request related to a problem? Please describe.

The Which-Key spellcheck workflow is great and better than most other alternatives. However, if I try and integrate it into functions (for example find the next badly spelled word and pop which key to correct) I'm struggling to get it to work as expected.

Describe the solution you'd like

Expose a spell check function that on calling checks current cursor word and opens which key, essentially replicating what is done by the user pressing z=

I can see most of the logic in which-key.plugins.spelling.expand()

Describe alternatives you've considered

I've experimented with using which-key.plugins.spelling.expand() and can access some of the data in the table it returns but I haven't managed to get it all to work together; apologies I'm not particularly skilled with lua.

I have also tried using vim.cmd and vim.feedkey to just pass z= but it still opens the default vim spell check rather than which key.

Additional context

I appreciate this is not a high priority feature and is probably only useful to a small number of edge cases but its so tantalizing as all the logic is there and I can't quite seem to access it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststaleThis issue or PR has been inactive for a while

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions