Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor Does Not Move to Next Snippet Placeholder Position When Accepting a Completion Within a Snippet Placeholder Node #148

Closed
Drew-Daniels opened this issue Oct 20, 2024 · 1 comment

Comments

@Drew-Daniels
Copy link

I noticed an issue when using snippets, like the one I have for .json files:

{
  "Property": {
    "body": "\"${1:KEY}\": ${2:VALUE}",
    "prefix": "pr",
    "description": "A JSON Object Property"
  }
}

If I am typing within the first snippet node, and see a completion come up that I would like to use, like language, if I accept that completion, I exit the snippet, and can't jump to the next node of the snippet.

path  fish json
image

Instead of this, I would expect for me to jump to the next node, like this:

path
@Saghen Saghen closed this as completed in 0f5f484 Oct 20, 2024
@Saghen
Copy link
Owner

Saghen commented Oct 20, 2024

I can't handle all cases since accepting a snippet completion item (which can be returned by any source, not just the snippet source) will call vim.snippet.expand which replaces the current snippet context. However, the buffer source was incorrectly marking its items as snippets which caused the issue for this specific case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants