diff options
author | A Farzat <a@farzat.xyz> | 2024-11-06 09:09:37 +0900 |
---|---|---|
committer | A Farzat <a@farzat.xyz> | 2024-11-13 09:13:20 +0900 |
commit | 7ec1fa7385c1b88a2efdad72c805b254c52084bd (patch) | |
tree | 2917de2bbd3552adca5dbe4989460f4b25672595 /.config/nvim/plugin-settings/luasnip.lua | |
parent | cb5affa0e11c200f175e26ced4f2866aa916d2c9 (diff) | |
download | dotfiles-7ec1fa7385c1b88a2efdad72c805b254c52084bd.tar.gz dotfiles-7ec1fa7385c1b88a2efdad72c805b254c52084bd.zip |
Remove nvim submodule
Nvim config will be included as bare files instead of a submodule. The
nvim config repo will still exist, but the content will be used by yadm
without the repo itself.
Diffstat (limited to '.config/nvim/plugin-settings/luasnip.lua')
-rw-r--r-- | .config/nvim/plugin-settings/luasnip.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/.config/nvim/plugin-settings/luasnip.lua b/.config/nvim/plugin-settings/luasnip.lua new file mode 100644 index 0000000..c8cd578 --- /dev/null +++ b/.config/nvim/plugin-settings/luasnip.lua @@ -0,0 +1,32 @@ +local luasnip = require("luasnip") + +require("luasnip.loaders.from_vscode").lazy_load() + +local opts = { noremap = true, silent = true } + +vim.keymap.set("i", "<C-l>", function() + luasnip.expand() +end, opts) +vim.keymap.set("s", "<C-l>", function() + luasnip.expand() +end, opts) +vim.keymap.set("i", "<C-k>", function() + if luasnip.jumpable(1) then + luasnip.jump(1) + end +end, opts) +vim.keymap.set("s", "<C-k>", function() + if luasnip.jumpable(1) then + luasnip.jump(1) + end +end, opts) +vim.keymap.set("i", "<C-j>", function() + if luasnip.jumpable(-1) then + luasnip.jump(-1) + end +end, opts) +vim.keymap.set("s", "<C-j>", function() + if luasnip.jumpable(-1) then + luasnip.jump(-1) + end +end, opts) |