feat(neovim): enable and configure blink-cmp plugin
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s
All checks were successful
Flake checker / Build Nix targets (push) Successful in 9m26s
This commit is contained in:
6
flake.lock
generated
6
flake.lock
generated
@@ -2532,11 +2532,11 @@
|
||||
"norg-meta": "norg-meta"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1760523604,
|
||||
"narHash": "sha256-jI9PANPWfkAyLzMDeryPjiL7S+Y3h9YJ5qdCS2v1ozY=",
|
||||
"lastModified": 1760631802,
|
||||
"narHash": "sha256-S7Y99hLRow3m6V3bt65bKpuvwewUF4q5SD/Xm+ZU8+8=",
|
||||
"owner": "nvim-neorg",
|
||||
"repo": "nixpkgs-neorg-overlay",
|
||||
"rev": "a5dcae3e46a59744969eb48290db0a9253d86ac9",
|
||||
"rev": "e6919e67252a6ced7f97ab8a6cdd0599b94c0024",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -534,92 +534,133 @@ in {
|
||||
# end
|
||||
# '';
|
||||
};
|
||||
# blink-cmp = {
|
||||
# enable = false;
|
||||
# settings = {
|
||||
# sources = {
|
||||
# cmdline = [];
|
||||
# default = ["lsp" "dictionary" "snippets" "path" "buffer"];
|
||||
# providers = {
|
||||
# buffer = {
|
||||
# score_offset = -7;
|
||||
# };
|
||||
# lsp = {
|
||||
# fallbacks = [];
|
||||
# };
|
||||
# path = {};
|
||||
# dictionary = {
|
||||
# module = "blink-cmp-dictionary";
|
||||
# name = "Dict";
|
||||
# min_keyword_length = 3;
|
||||
# opts = {
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# 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 = {
|
||||
blink-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";
|
||||
};
|
||||
completion = {
|
||||
documentation.window.border = "rounded";
|
||||
menu.border = "rounded";
|
||||
};
|
||||
window = {
|
||||
completion = {
|
||||
inherit border;
|
||||
};
|
||||
documentation = {
|
||||
inherit border;
|
||||
};
|
||||
signature = {
|
||||
window.border = "rounded";
|
||||
};
|
||||
mapping = {
|
||||
keymap = {
|
||||
# "<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'})";
|
||||
# "<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'})";
|
||||
"<C-n>" = [
|
||||
"select_next"
|
||||
"fallback"
|
||||
];
|
||||
"<C-p>" = [
|
||||
"select_prev"
|
||||
"fallback"
|
||||
];
|
||||
# "<c-l>" = [
|
||||
# "snippet_forward"
|
||||
# "fallback"
|
||||
# ];
|
||||
# "<c-h>" = [
|
||||
# "snippet_backward"
|
||||
# "fallback"
|
||||
# ];
|
||||
"<C-u>" = [
|
||||
"scroll_documentation_up"
|
||||
"fallback"
|
||||
];
|
||||
"<C-d>" = [
|
||||
"scroll_documentation_down"
|
||||
"fallback"
|
||||
];
|
||||
};
|
||||
sources = {
|
||||
cmdline = [];
|
||||
default = ["lsp" "dictionary" "snippets" "path" "buffer"];
|
||||
providers = {
|
||||
buffer = {
|
||||
score_offset = -7;
|
||||
};
|
||||
lsp = {
|
||||
fallbacks = [];
|
||||
};
|
||||
path = {};
|
||||
dictionary = {
|
||||
module = "blink-cmp-dictionary";
|
||||
name = "Dict";
|
||||
min_keyword_length = 3;
|
||||
opts = {
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
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;
|
||||
settings.impersonate_nvim_cmp = 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 =
|
||||
# lua
|
||||
|
||||
Reference in New Issue
Block a user