2024-08-24 23:04:20 -07:00
|
|
|
{
|
2024-08-24 23:36:19 -07:00
|
|
|
plugins = {
|
2024-09-16 23:48:33 -07:00
|
|
|
lspkind = {
|
|
|
|
enable = true;
|
|
|
|
cmp.enable = true;
|
|
|
|
};
|
2024-08-24 23:04:20 -07:00
|
|
|
cmp-async-path.enable = true;
|
|
|
|
cmp = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
autoEnableSources = true;
|
2024-09-02 18:28:53 -07:00
|
|
|
experimental = {
|
|
|
|
ghost_text = true;
|
|
|
|
};
|
2024-08-24 23:04:20 -07:00
|
|
|
performance = {
|
|
|
|
debounce = 60;
|
|
|
|
fetchingTimeout = 200;
|
|
|
|
maxViewEntries = 30;
|
|
|
|
};
|
2024-09-02 18:28:53 -07:00
|
|
|
snippet = {
|
|
|
|
expand = "luasnip";
|
|
|
|
};
|
|
|
|
formatting = {
|
|
|
|
fields = [
|
|
|
|
"kind"
|
|
|
|
"abbr"
|
|
|
|
"menu"
|
|
|
|
];
|
|
|
|
};
|
2024-08-24 23:04:20 -07:00
|
|
|
sources = [
|
2024-09-02 18:28:53 -07:00
|
|
|
{ name = "nvim_lsp"; }
|
|
|
|
{ name = "emoji"; }
|
2024-08-24 23:04:20 -07:00
|
|
|
{
|
|
|
|
name = "buffer"; # text within current buffer
|
|
|
|
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
|
|
|
keywordLength = 3;
|
|
|
|
}
|
|
|
|
# { name = "copilot"; } # enable/disable copilot
|
|
|
|
{
|
|
|
|
name = "path"; # file system paths
|
|
|
|
keywordLength = 3;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "luasnip"; # snippets
|
|
|
|
keywordLength = 3;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
window = {
|
2024-09-02 18:28:53 -07:00
|
|
|
completion = {
|
|
|
|
border = "solid";
|
|
|
|
};
|
|
|
|
documentation = {
|
|
|
|
border = "solid";
|
|
|
|
};
|
2024-08-24 23:04:20 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
mapping = {
|
|
|
|
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
|
|
|
"<C-n>" = "cmp.mapping.select_next_item()";
|
|
|
|
"<C-p>" = "cmp.mapping.select_prev_item()";
|
|
|
|
"<C-e>" = "cmp.mapping.abort()";
|
|
|
|
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
|
|
|
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
|
|
|
"<C-Space>" = "cmp.mapping.complete()";
|
|
|
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
|
|
|
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
cmp-nvim-lsp = {
|
|
|
|
enable = true; # LSP
|
|
|
|
};
|
|
|
|
cmp-buffer = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
cmp-path = {
|
|
|
|
enable = true; # file system paths
|
|
|
|
};
|
|
|
|
cmp-cmdline = {
|
|
|
|
enable = true; # autocomplete for cmdline
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|