diff --git a/lua/astrocommunity/motion/tabout-nvim/README.md b/lua/astrocommunity/motion/tabout-nvim/README.md new file mode 100644 index 000000000..c5c88e3a9 --- /dev/null +++ b/lua/astrocommunity/motion/tabout-nvim/README.md @@ -0,0 +1,5 @@ +# tabout.nvim + +tabout plugin for neovim + +**Repository:** diff --git a/lua/astrocommunity/motion/tabout-nvim/init.lua b/lua/astrocommunity/motion/tabout-nvim/init.lua new file mode 100644 index 000000000..d90e7c4c1 --- /dev/null +++ b/lua/astrocommunity/motion/tabout-nvim/init.lua @@ -0,0 +1,23 @@ +return { + "abecodes/tabout.nvim", + event = "InsertEnter", + dependencies = { + "nvim-treesitter/nvim-treesitter", + { + "hrsh7th/nvim-cmp", + opts = function(_, opts) + local cmp, luasnip = require "cmp", require "luasnip" + opts.mapping[""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, { "i", "s" }) + end, + }, + }, + opts = {}, +}