Skip to content

feat(commands): Filter command completion by ArgLead and add delete-session picker#40

Merged
mhiro2 merged 1 commit into
mainfrom
feat/command-completion-arglead-filter
Jun 3, 2026
Merged

feat(commands): Filter command completion by ArgLead and add delete-session picker#40
mhiro2 merged 1 commit into
mainfrom
feat/command-completion-arglead-filter

Conversation

@mhiro2
Copy link
Copy Markdown
Owner

@mhiro2 mhiro2 commented Jun 3, 2026

Summary

  • Add prefix filtering to user command completion so typing a partial argument narrows the candidate list — Lua-function completion is customlist-style, which Neovim does not filter against ArgLead on its own.
  • Make PeekstackDeleteSession accept an optional name and fall back to a vim.ui.select picker of saved sessions when invoked without one, matching PeekstackListSessions.

Changes

  • 859fc5c : feat(commands): filter command completion by ArgLead and add delete picker
    • Add a filter_by_prefix helper and apply it to PeekstackRestoreSession, PeekstackDeleteSession, and PeekstackQuickPeek completions; QuickPeek candidates keep the registry's sorted order since filtering only narrows.
    • Change PeekstackDeleteSession to nargs="?" so a nameless invocation lists saved sessions for selection before confirming deletion, sharing a confirm_delete_session helper with the named path.
    • Update README and the help doc for the optional [name] argument and add command spec coverage for prefix filtering and the delete picker flow.

…icker

User command completion implemented as a Lua function behaves like
customlist, so Neovim never narrows the returned candidates against the
typed prefix. Add filter_by_prefix and apply it to the
PeekstackRestoreSession, PeekstackDeleteSession, and PeekstackQuickPeek
completions so only prefix-matching names are offered; the QuickPeek
provider list already arrives sorted from the registry, so filtering
preserves that order. PeekstackDeleteSession now takes an optional name
and, when omitted, lists saved sessions via vim.ui.select before
confirming, matching PeekstackListSessions.
@mhiro2 mhiro2 self-assigned this Jun 3, 2026
@mhiro2 mhiro2 added the enhancement New feature or request label Jun 3, 2026
@mhiro2 mhiro2 merged commit 7009671 into main Jun 3, 2026
3 checks passed
@mhiro2 mhiro2 deleted the feat/command-completion-arglead-filter branch June 3, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant