snippets: search luasnip with telescope

- Adds a keymap to search for snippets with telescope.
- Improves the markdown snippets.

Co-Authored-by: iGor milhit <igor@milhit.ch>
fix-treesitter
iGor milhit 2025-12-21 09:09:47 +01:00
parent 5a4aef50cd
commit 8c222d187d
Signed by: igor
GPG Key ID: 692D97C3D0228A99
2 changed files with 14 additions and 5 deletions

View File

@ -131,5 +131,14 @@ return {
"<cmd>Telescope keymaps<cr>", "<cmd>Telescope keymaps<cr>",
{ desc = "[Telescope] [S]earch [K]eymaps" } { desc = "[Telescope] [S]earch [K]eymaps" }
) )
-- <leader>ss to search for keymaps
vim.keymap.set(
"n",
"<leader>ss",
"<cmd>Telescope luasnip<cr>",
{ desc = "[Telescope] [S]earch [S]nippets" }
)
end, end,
} }

View File

@ -71,7 +71,7 @@ return {
s( s(
{ {
trig = "ie", trig = "ie",
Name = "Inc entry", Name = "[journal] Inc entry",
dscr = "Insert an Inc entry for today (heading level 2)." dscr = "Insert an Inc entry for today (heading level 2)."
}, },
fmt( fmt(
@ -97,7 +97,7 @@ return {
title: {1} title: {1}
date: {3} date: {3}
id: {4} id: {4}
tags: [{2}] tags: ["{2}"]
--- ---
]], ]],
@ -112,7 +112,7 @@ return {
s( s(
{ {
trig = "inc", trig = "inc",
name = "INC YAML frontmatter", name = "[journal] INC YAML frontmatter",
dscr = "Insert a YAML frontmatter for INC notes.\n\nIt has a datetime with the locale daylight saving time, prefilled title, author, categories and tags.\nAdjust the title manually." dscr = "Insert a YAML frontmatter for INC notes.\n\nIt has a datetime with the locale daylight saving time, prefilled title, author, categories and tags.\nAdjust the title manually."
}, },
fmt( fmt(
@ -121,7 +121,7 @@ return {
title: {1} title: {1}
date: {2} date: {2}
id: {4} id: {4}
tags: [notes, quotidien, {3}] tags: ["notes", "quotidien", "{3}"]
--- ---
]], ]],
@ -145,7 +145,7 @@ return {
title: {3} title: {3}
date: {4} date: {4}
id: {5} id: {5}
tags: [{1}] tags: ["{1}"]
séance: séance:
- type: "{2}" - type: "{2}"
données: données: