diff --git a/after/plugin/luasnip.lua b/after/plugin/luasnip.lua new file mode 100644 index 0000000..7bc7608 --- /dev/null +++ b/after/plugin/luasnip.lua @@ -0,0 +1,5 @@ +local opts = { noremap = true, silent = true } +local ls = require("luasnip") +vim.api.nvim_set_keymap("n", "nf", ":lua require('neogen').generate()", opts) +vim.keymap.set({"i", "s"}, "", function() ls.jump( 1) end, {silent = true}) +vim.keymap.set({"i", "s"}, "", function() ls.jump(-1) end, {silent = true}) diff --git a/lua/pippy/init.lua b/lua/pippy/init.lua index cf99f4c..f43315e 100644 --- a/lua/pippy/init.lua +++ b/lua/pippy/init.lua @@ -1,5 +1,5 @@ -require("pippy.lazy") require("pippy.remap") +require("pippy.lazy") vim.opt.nu = true vim.opt.relativenumber = true diff --git a/lua/pippy/lazy.lua b/lua/pippy/lazy.lua index b0d77b9..3e93d5f 100644 --- a/lua/pippy/lazy.lua +++ b/lua/pippy/lazy.lua @@ -49,6 +49,7 @@ require("lazy").setup({ cmd = "Neoconf" }, "folke/neodev.nvim", + -- {'akinsho/toggleterm.nvim', version = "*", config = true}, {"danymat/neogen", dependencies = "nvim-treesitter/nvim-treesitter", config = true}, {'williamboman/mason.nvim'}, {'williamboman/mason-lspconfig.nvim'}, diff --git a/lua/pippy/remap.lua b/lua/pippy/remap.lua index f5843ae..60fff83 100644 --- a/lua/pippy/remap.lua +++ b/lua/pippy/remap.lua @@ -16,8 +16,3 @@ vim.keymap.set("n", "sg", [[:%s/\<\>//gI vim.keymap.set("n", "ss", [[:.,$s/\<\>//gIc]]) --Search and replace incremental vim.keymap.set("n", "", [[/\<\>/]]) -- ctrl find -local opts = { noremap = true, silent = true } -local ls = require("luasnip") -vim.api.nvim_set_keymap("n", "nf", ":lua require('neogen').generate()", opts) -vim.keymap.set({"i", "s"}, "", function() ls.jump( 1) end, {silent = true}) -vim.keymap.set({"i", "s"}, "", function() ls.jump(-1) end, {silent = true})