comparison .chezmoitemplates/init.lua @ 741:aef7dab2b0e5

feat: only jump snippets if inside one
author zegervdv <zegervdv@me.com>
date Thu, 22 Dec 2022 10:44:01 +0100
parents 68cb1c4b268c
children 3ebd380b6ce1
comparison
equal deleted inserted replaced
740:68cb1c4b268c 741:aef7dab2b0e5
1144 1144
1145 -- Snippets 1145 -- Snippets
1146 local ls = require 'luasnip' 1146 local ls = require 'luasnip'
1147 -- Expand snippet or jump to next placeholder 1147 -- Expand snippet or jump to next placeholder
1148 vim.keymap.set({ 'i', 's' }, '<c-k>', function() 1148 vim.keymap.set({ 'i', 's' }, '<c-k>', function()
1149 if ls.expand_or_jumpable() then ls.expand_or_jump() end 1149 if ls.expand_or_locally_jumpable() then ls.expand_or_jump() end
1150 end, { 1150 end, {
1151 silent = true, 1151 silent = true,
1152 }) 1152 })
1153 1153
1154 -- Go back to previous placeholder 1154 -- Go back to previous placeholder