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

Double html snippets when extending with html snippets #529

Open
abiud254 opened this issue Nov 30, 2024 · 2 comments
Open

Double html snippets when extending with html snippets #529

abiud254 opened this issue Nov 30, 2024 · 2 comments

Comments

@abiud254
Copy link

While trying to set up neovim for htmldjango files, I was unable to get my html-lsp working inside htmldjango files. Not really a issue with this repo of course.

The only solution I came across was extending htmldjango files with html snippets. However, upon doing so, I get double html snippets.
I've tried uninstalling lsps to narrow down the issue and it seems to only happen after I extend these snippets like so:

local luasnip = require("luasnip")

-- loads vscode style snippets from installed plugins (e.g. friendly-snippets)
require("luasnip.loaders.from_vscode").lazy_load()

-- Include snippets not in global snippets for friendly-snippets
luasnip.filetype_extend("htmldjango", { "html", "loremipsum", "djangohtml" })
luasnip.filetype_extend("html", { "loremipsum" })
lluasnip.filetype_extend("python", { "django" })

Here is how it looks like:
html

Is anyone else getting the same or is it just me?

@OkelleyDevelopment
Copy link
Collaborator

FWIW, I was unable to replicate this issue locally, but I have in the past had duplicate snippets. I'll leave this open for a few more days in the event I figure something out in my spare time OR if someone else encounters the issue too 🤔

@victordumetz
Copy link

I run into the exact same issue when adding luasnip.filetype_extend("htmldjango", { "html" }) to my config.

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

3 participants