feat: Added blink-cmp

This commit is contained in:
uttarayan21
2025-06-18 22:45:47 +05:30
parent 5a30201864
commit 5daeab59d3

View File

@@ -167,7 +167,6 @@ in {
}; };
}; };
}; };
codecompanion.enable = true;
copilot-lua = { copilot-lua = {
enable = true; enable = true;
settings = { settings = {
@@ -231,7 +230,7 @@ in {
}; };
"core.completion" = { "core.completion" = {
config = { config = {
engine = "nvim-cmp"; engine = "blink-cmp";
name = "[Norg]"; name = "[Norg]";
}; };
}; };
@@ -501,64 +500,94 @@ in {
end end
''; '';
}; };
cmp = { blink-cmp = {
enable = true; enable = true;
settings = { settings = {
autoEnableSources = true; sources = {
sources = [ cmdline = [];
{name = "buffer";} default = ["dictionary" "path" "lsp" "buffer"];
{name = "buffer";} providers = {
{name = "cmdline";} buffer = {
{name = "cmp-clippy";} score_offset = -7;
{name = "cmp-cmdline-history";} };
{name = "crates";} lsp = {
{name = "dap";} fallbacks = [];
# {name = "dictionary";} };
{name = "fish";} path = {};
{name = "git";} dictionary = {
{name = "luasnip";} module = "blink-cmp-dictionary";
{name = "nvim_lsp";} name = "Dict";
{name = "nvim_lua";} min_keyword_length = 3;
{name = "nvim_lsp_signature_help";} opts = {
{name = "nvim_lsp_document_symbol";} };
{name = "path";} };
{name = "rg";}
{name = "spell";}
{name = "tmux";}
{name = "treesitter";}
];
view = {
entries = {
name = "custom";
selection_order = "near_cursor";
}; };
}; };
window = {
completion = {
inherit border;
};
documentation = {
inherit border;
};
};
mapping = {
# "<CR>" = "cmp.mapping.confirm({select = true})";
"<CR>" = "cmp.mapping.confirm()";
"<C-Space>" = "cmp.mapping.complete()";
"<C-n>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
"<C-p>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
};
snippet.expand =
/*
lua
*/
''
function(args)
require('luasnip').lsp_expand(args.body)
end
'';
}; };
}; };
blink-cmp-dictionary.enable = true;
blink-cmp-git.enable = true;
blink-cmp-copilot.enable = true;
blink-cmp-spell.enable = true;
blink-compat.enable = true;
#cmp = {
# enable = true;
# settings = {
# autoEnableSources = true;
# sources = [
# {name = "buffer";}
# {name = "buffer";}
# {name = "cmdline";}
# {name = "cmp-clippy";}
# {name = "cmp-cmdline-history";}
# {name = "crates";}
# {name = "dap";}
# # {name = "dictionary";}
# {name = "fish";}
# {name = "git";}
# {name = "luasnip";}
# {name = "nvim_lsp";}
# {name = "nvim_lua";}
# {name = "nvim_lsp_signature_help";}
# {name = "nvim_lsp_document_symbol";}
# {name = "path";}
# {name = "rg";}
# {name = "spell";}
# {name = "tmux";}
# {name = "treesitter";}
# ];
# view = {
# entries = {
# name = "custom";
# selection_order = "near_cursor";
# };
# };
# window = {
# completion = {
# inherit border;
# };
# documentation = {
# inherit border;
# };
# };
# mapping = {
# # "<CR>" = "cmp.mapping.confirm({select = true})";
# "<CR>" = "cmp.mapping.confirm()";
# "<C-Space>" = "cmp.mapping.complete()";
# "<C-n>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
# "<C-p>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
# };
# snippet.expand =
# /*
# lua
# */
# ''
# function(args)
# require('luasnip').lsp_expand(args.body)
# end
# '';
# };
#};
}; };
extraConfigLua = extraConfigLua =
/* /*