Skip to content

Check first (n?) characters of a suggestion #487

@doggobit0

Description

@doggobit0

So I probably hate myself more than most people and want to use <Tab> for completions :)

But I'm trying to dynamically check if the first (few?) characters of a suggestion are \t, in which case I'll simply passthrough the Tab key. I am sort of able to do this right now with suggestion.accept(<function>), but I think it'd be a quick and user friendly addition to either provide a method to get the first (n?) chars of a suggestion, or take in a string and match it against its text. E.g.:

local first_5 = suggestion.get_n_chars(5)
-- or
local starts_with_tab = suggestion.startswith('\t')

Anyway, cheers for the amazing plugin!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions