nix fmt to update lua files
This commit is contained in:
parent
330feb587f
commit
2fd7a24284
6 changed files with 219 additions and 219 deletions
|
@ -1,54 +1,54 @@
|
|||
local cmp = require("cmp")
|
||||
local luasnip = require("luasnip");
|
||||
local luasnip = require("luasnip")
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-h"] = cmp.mapping.abort(),
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
["<C-h"] = cmp.mapping.abort(),
|
||||
|
||||
["<C-k>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
else
|
||||
cmp.confirm({
|
||||
select = true,
|
||||
})
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end),
|
||||
["<C-k>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
if luasnip.expandable() then
|
||||
luasnip.expand()
|
||||
else
|
||||
cmp.confirm({
|
||||
select = true,
|
||||
})
|
||||
end
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end),
|
||||
|
||||
["<C-n>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
elseif cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-n>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
elseif cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
|
||||
["<C-p>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
elseif cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = cmp.config.sources ({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
})
|
||||
}
|
||||
["<C-p>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
elseif cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue