meta completion #500

Merged
navicore merged 1 commit from issue-493 into main 2026-05-20 14:41:56 +00:00
Owner

#493

  • detect_context now returns LintAllow whenever the comment text is a non-empty prefix of seq:allow( — so typing

    s, # se, # seq:, etc. all open the popup. Bare # and unrelated comments stay InComment.

  • get_lint_allow_completions has two modes:
    • Pre-paren (no ( yet): returns a single snippet item labeled seq:allow(...) with insert_text =
      "seq:allow($0)". Accepting it scaffolds the marker and parks the cursor between the parens.
    • In-paren (existing): returns the prefix-filtered per-ID list.
  • Added filter_text: "seq:allow" on the snippet so editors that match on filter-text (not label) keep it visible
    across the typed prefix.
  • New test covers pre-paren detection across the prefix sequence and asserts the snippet shape; the bare # / #
    todo cases assert no false-positive popup.

Restart the LSP and try # s → you should see the seq:allow(...) snippet appear; accepting it should park the
cursor inside the parens, where the existing ID list takes over.

https://git.navicore.tech/navicore/patch-seq/issues/493 - detect_context now returns LintAllow whenever the comment text is a non-empty prefix of seq:allow( — so typing # s, # se, # seq:, etc. all open the popup. Bare # and unrelated comments stay InComment. - get_lint_allow_completions has two modes: - Pre-paren (no ( yet): returns a single snippet item labeled seq:allow(...) with insert_text = "seq:allow($0)". Accepting it scaffolds the marker and parks the cursor between the parens. - In-paren (existing): returns the prefix-filtered per-ID list. - Added filter_text: "seq:allow" on the snippet so editors that match on filter-text (not label) keep it visible across the typed prefix. - New test covers pre-paren detection across the prefix sequence and asserts the snippet shape; the bare # / # todo cases assert no false-positive popup. Restart the LSP and try # s → you should see the seq:allow(...) snippet appear; accepting it should park the cursor inside the parens, where the existing ID list takes over.
meta completion
All checks were successful
CI - Linux / CI - Linux x86_64 (pull_request) Successful in 8m33s
19c8bc43d8
- detect_context now returns LintAllow whenever the comment text is a non-empty prefix of seq:allow( — so typing
   # s, # se, # seq:, etc. all open the popup. Bare #  and unrelated comments stay InComment.
  - get_lint_allow_completions has two modes:
    - Pre-paren (no ( yet): returns a single snippet item labeled seq:allow(...) with insert_text =
  "seq:allow($0)". Accepting it scaffolds the marker and parks the cursor between the parens.
    - In-paren (existing): returns the prefix-filtered per-ID list.
  - Added filter_text: "seq:allow" on the snippet so editors that match on filter-text (not label) keep it visible
   across the typed prefix.
  - New test covers pre-paren detection across the prefix sequence and asserts the snippet shape; the bare #  / #
  todo cases assert no false-positive popup.

  Restart the LSP and try # s → you should see the seq:allow(...) snippet appear; accepting it should park the
  cursor inside the parens, where the existing ID list takes over.
navicore deleted branch issue-493 2026-05-20 14:41:56 +00:00
Sign in to join this conversation.
No description provided.