This commit is contained in:
meml0rz
2024-11-12 20:47:58 +01:00
parent c2ee629754
commit e1cde180a9
2 changed files with 29 additions and 29 deletions

View File

@ -14,33 +14,6 @@
{name = "buffer";}
{name = "luasnip";}
];
mapping = {
__raw = ''
"<Tab>" = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" });
"<S-Tab>" = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" });
'';
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.abort()";
"<C-Left>" = "cmp.mapping.abort()";
"<CR>" = "cmp.mapping.confirm({ select = false })";
};
};
};
};

View File

@ -8,6 +8,33 @@
programs.nixvim = {
enable = true;
colorschemes.oxocarbon.enable = true;
extraConfigLua = ''
mapping = cmp.mapping.preset.insert({
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end, { "i", "s" }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<C-Left>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false }),
}),
'';
plugins = {
lualine = {
enable = true;