fix: Fix luasnip helpers.fill
This commit is contained in:
parent
2f8570871f
commit
c574208de4
1 changed files with 6 additions and 6 deletions
|
@ -1,24 +1,24 @@
|
|||
local ls = require("luasnip")
|
||||
local ls = require('luasnip')
|
||||
local sn = ls.snippet_node
|
||||
local i = ls.insert_node
|
||||
|
||||
local M = {}
|
||||
|
||||
M.fill = function(_, parent, args)
|
||||
local title = ""
|
||||
local title = ''
|
||||
local chars = {}
|
||||
|
||||
if #parent.snippet.env.LS_SELECT_RAW > 0 then
|
||||
if type(parent.snippet.env.LS_SELECT_RAW) == 'table' then
|
||||
for _, ele in ipairs(parent.snippet.env.LS_SELECT_RAW) do
|
||||
title = title .. ele .. " "
|
||||
title = title .. ele .. ' '
|
||||
end
|
||||
end
|
||||
|
||||
for str in string.gmatch(args, "([^%%]+)") do
|
||||
for str in string.gmatch(args, '([^%%]+)') do
|
||||
table.insert(chars, str)
|
||||
end
|
||||
|
||||
local snip = chars[1] .. " " .. title
|
||||
local snip = chars[1] .. ' ' .. title
|
||||
|
||||
local _, c = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
|
||||
|
|
Loading…
Reference in a new issue