configure folding

This commit is contained in:
2024-11-14 15:58:58 +02:00
parent 231db82c0f
commit c49b758e86
11 changed files with 166 additions and 14 deletions

View File

@@ -11,7 +11,9 @@ vim.keymap.set({ "i", "s" }, "<C-l>", function()
end
end, { desc = "Snippet next argument", silent = true })
-- nvim config
--------------------
-- Snippets for LUA
--------------------
ls.add_snippets('lua', {
s({ name = 'LuaSnip Snippet', trig = 'snipf' },
fmt([[
@@ -44,7 +46,9 @@ ls.add_snippets('lua', {
),
})
-- Comment block
--------------------
-- Generic snippets
--------------------
local function com_string(_, snip, to_multiply)
local comment_string = vim.bo.commentstring
local repeats = snip.captures[1]
@@ -78,3 +82,29 @@ ls.add_snippets('all', {
),
})
--------------------
-- Terraform
--------------------
ls.add_snippets('terraform', {
s({ name = 'data_assume', trig = 'tf_assume' },
fmt([[
data "aws_iam_policy_document" "<name>" {
statement {
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["<service>.amazonaws.com"]
}
}
}
]],
{
name = i(1, 'assume'),
service = i(2, 'service')
},
{ delimiters = '<>' }
)
),
})