changed telesnip and formatted some stuff
This commit is contained in:
parent
b36925682a
commit
d9122c06de
4 changed files with 73 additions and 44 deletions
|
@ -1,16 +1,21 @@
|
|||
-- Example assuming you're configuring your plugin in lazy.nvim
|
||||
return {
|
||||
"https://git.k4li.de/pika/telesnip.nvim",
|
||||
config = function()
|
||||
-- Load your plugin
|
||||
local telesnip = require("telesnip")
|
||||
telesnip.setup({
|
||||
-- snippet_path = "/path/to/your/snippets",
|
||||
})
|
||||
|
||||
-- Define the :Snippets command
|
||||
vim.api.nvim_create_user_command("Snippets", function()
|
||||
telesnip.snippet_picker()
|
||||
-- Define the :TelesnipSnippets command
|
||||
vim.api.nvim_create_user_command("TelesnipSnippets", function()
|
||||
telesnip.telesnip_show()()
|
||||
end, {})
|
||||
|
||||
-- Optional: Set up a keybinding if desired
|
||||
vim.keymap.set("n", "<leader>S", ":Snippets<CR>", { desc = "Open Snippet Picker" })
|
||||
vim.keymap.set("n", "<leader>S", ":TelesnipSnippets<CR>", { desc = "Open Snippet Picker" })
|
||||
vim.keymap.set("v", "<leader>cs", function()
|
||||
require("telesnip").save_custom_snippet()
|
||||
end, { noremap = true })
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue