chore: stylua formatting
This commit is contained in:
@@ -14,7 +14,7 @@ config.setup = function(default, user)
|
||||
end
|
||||
rawset(langs, ft, ft_config)
|
||||
return ft_config
|
||||
end
|
||||
end,
|
||||
})
|
||||
config._data = data
|
||||
return data
|
||||
|
||||
@@ -222,6 +222,5 @@ return setmetatable({}, {
|
||||
-- Add range mark after first jump
|
||||
mark:add_range_mark({ row, 0, row + #template_content, 1 })
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
@@ -70,8 +70,7 @@ end
|
||||
|
||||
mark.add_range_mark = function(self, range)
|
||||
local row, col, end_row, end_col = unpack(range)
|
||||
self.range_id = api.nvim_buf_set_extmark(self.bufnr, ns, row, col,
|
||||
{end_row = end_row, end_col = end_col})
|
||||
self.range_id = api.nvim_buf_set_extmark(self.bufnr, ns, row, col, { end_row = end_row, end_col = end_col })
|
||||
end
|
||||
|
||||
mark.cursor_in_range = function(self, validated)
|
||||
|
||||
@@ -20,7 +20,6 @@ return {
|
||||
return vim.tbl_keys(language.parent)
|
||||
end,
|
||||
split = function(s, sep, plain)
|
||||
return vim.fn.has("nvim-0.6") == 1 and vim.split(s, sep, {plain = plain}) or
|
||||
vim.split(s, sep, plain)
|
||||
end
|
||||
return vim.fn.has("nvim-0.6") == 1 and vim.split(s, sep, { plain = plain }) or vim.split(s, sep, plain)
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -63,16 +63,17 @@ return {
|
||||
result = result or {}
|
||||
|
||||
for _, subtree in pairs(tree) do
|
||||
assert(not subtree.retrieve or vim.tbl_contains({"all", "first"}, subtree.retrieve),
|
||||
"Supported nodes matching: all|first")
|
||||
assert(
|
||||
not subtree.retrieve or vim.tbl_contains({ "all", "first" }, subtree.retrieve),
|
||||
"Supported nodes matching: all|first"
|
||||
)
|
||||
|
||||
-- Match all child nodes of the parent node
|
||||
local matched = self:matching_child_nodes(parent, subtree.node_type)
|
||||
|
||||
-- Only keep the node with custom position
|
||||
if not subtree.retrieve then
|
||||
assert(type(subtree.position) == "number",
|
||||
"please require position if retrieve is nil")
|
||||
assert(type(subtree.position) == "number", "please require position if retrieve is nil")
|
||||
matched = { matched[subtree.position] }
|
||||
end
|
||||
|
||||
@@ -94,5 +95,5 @@ return {
|
||||
end
|
||||
end
|
||||
return result
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user