changed telesnip a bit

This commit is contained in:
pika 2024-08-22 14:46:12 +02:00
parent 22f0c03b40
commit 5fd69f0d7c

View file

@ -1,15 +1,22 @@
return { return {
"https://git.k4li.de/pika/telesnip.nvim", "https://git.k4li.de/pika/telesnip.nvim",
dependencies = "nvim-telescope/telescope.nvim", dependencies = "nvim-telescope/telescope.nvim",
opts = { opts = {
-- snippet_path = "/path/to/your/snippets", -- ╭────────────────────────────────────────────────────────────────────────╮
-- custom_snippet_path = "/path/to/your/custom/snippets", -- │ customize your custom_snippet_path (if you change the snippet_path │
}, -- │ you might break something, as this is the directory for the snippets │
config = function(_, opts) -- │ inside the plugin folder) │
require("telesnip").setup(opts) -- ╰────────────────────────────────────────────────────────────────────────╯
end, -- snippet_path = "/path/to/your/snippets",
keys = { -- custom_snippet_path = "~/.config/nvim/snippets/",
{ "<leader>S", "<cmd>TelesnipShowSnippets<CR>", desc = "Open Snippet Picker" }, },
{ "<leader>cs", "<cmd>TelesnipCustomSnippet<CR>", mode = "v", desc = "Save Custom Snippet" }, config = function(_, opts)
}, require("telesnip").setup(opts)
end,
keys = {
-- ─< just the standard two keybindings I configured. Be sure to make your own one, if you'd like >─
{ "<leader>S", "<cmd>TelesnipShowSnippets<CR>", desc = "Open Snippet Picker" },
{ "<leader>cs", "<cmd>TelesnipCustomSnippet<CR>", mode = "v", desc = "Save Custom Snippet" },
},
} }