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

Custom Markdown Snippets Not Loading in LuaSnip #1289

Open
adimail opened this issue Jan 25, 2025 · 1 comment
Open

Custom Markdown Snippets Not Loading in LuaSnip #1289

adimail opened this issue Jan 25, 2025 · 1 comment

Comments

@adimail
Copy link

adimail commented Jan 25, 2025

After adding custom Markdown snippets in the ~/.config/nvim/lua/snippets/markdown.lua file and configuring LuaSnip, the snippets are not recognized in .md files. I have ensured filetype detection works and keybindings for snippet expansion are set up. However, the snippets remain inaccessible when editing Markdown files.

snippets/markdown.md

lua/snippets/markdown.md
local ls = require('luasnip')
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
local f = ls.function_node

return {
    -- Headings
    s('h1', { t('# '), i(1, 'Header 1') }),
    s('h2', { t('## '), i(1, 'Header 2') }),
    ...
    ...
    ...
}

Other extensions are working fine, but the markdown snippets are not working.

@adimail
Copy link
Author

adimail commented Jan 25, 2025

for more reference, here is my nvim 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

1 participant