Skip to content

Are multiple snippets with the same prefix supported? #160

@adrian5

Description

@adrian5

I have the following snippets defined:

"doc": {
  "prefix": ["doc"],
  "body": ["{{< doc \"${1:file}\" >}} $0"],
  "description": "variant 1"
},
"doc (full)": {
  "prefix": ["doc"],
  "body": ["{{< doc \"${1:file}#${2:anchor}\" \"${3:link-text}\" >}} $0"],
  "description": "variant 2"
}

But no matter which one I select in the context menu, I always end up getting variant 1 (in my buffer). If I delete variant 1 from above snippet file, I can use the remaining variant 2 just fine.

Since there aren't many examples in the doc, I'm not sure if this is supported yet.

I'm using vim-vsnip with completion-nvim.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions