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

Cannot Have Multiple Snippets With the Same Prefix #146

Open
Drew-Daniels opened this issue Oct 20, 2024 · 0 comments
Open

Cannot Have Multiple Snippets With the Same Prefix #146

Drew-Daniels opened this issue Oct 20, 2024 · 0 comments

Comments

@Drew-Daniels
Copy link

Really enjoying using blink.cmp, and thanks for all the awesome work on this!

My Issue

I have 2 snippets for .css files, both using the "td" prefix.

One is coming from friendly-snippets, and the other from my custom nvim/snippets directory.

However, when I edit a .css file, and type this prefix, I only see the snippet from friendly-snippets displayed, and not my custom one.

image

If I change the prefix to something else, like tdd instead of td, then I can see it listed:

image

I guess I'm used to how nvim-cmp and LuaSnip handled snippets with the same prefix/trigger and would display both as options instead of one, and I think that similar functionality would be desirable in blink.cmp as well.

Additional Context

nvim/snippets/package.json:

{
  "name": "my-snippets",
  "contributes": {
    "snippets": [
      {
        "language": "lua",
        "path": "./lua.json"
      },
      {
        "language": "sh",
        "path": "./sh.json"
      },
      {
        "language": "yaml",
        "path": "./yaml.json"
      },
      {
        "language": "css",
        "path": "./css.json"
      }
    ]
  }
}

nvim/snippets/css.json:

{
  "TODO": {
    "body": "// TODO: ${1:TODO}",
    "prefix": "tdd"
  }
}
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

1 participant