Neovim: Replace blink.cmp flake with nixpkgs + update its config
This commit is contained in:
@ -122,24 +122,24 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
# Manually define blink.cmp highlight groups until catpuccin supports it.
|
# Manually define blink.cmp highlight groups until catpuccin supports it. Update: Catpuccin supports it now.
|
||||||
BlinkCmpMenu = {
|
# BlinkCmpMenu = {
|
||||||
bg = "#${color.hex.dark.base}";
|
# bg = "#${color.hex.dark.base}";
|
||||||
};
|
# };
|
||||||
BlinkCmpMenuBorder = {
|
# BlinkCmpMenuBorder = {
|
||||||
bg = "#${color.hex.dark.base}";
|
# bg = "#${color.hex.dark.base}";
|
||||||
fg = "#${color.hex.dark.blue}";
|
# fg = "#${color.hex.dark.blue}";
|
||||||
};
|
# };
|
||||||
BlinkCmpMenuSelection = {
|
# BlinkCmpMenuSelection = {
|
||||||
bg = "#${color.hex.dark.blue}";
|
# bg = "#${color.hex.dark.blue}";
|
||||||
fg = "#${color.hex.dark.crust}";
|
# fg = "#${color.hex.dark.crust}";
|
||||||
bold = true;
|
# bold = true;
|
||||||
};
|
# };
|
||||||
BlinkCmpLabel = {
|
# BlinkCmpLabel = {
|
||||||
bg = "#${color.hex.dark.base}";
|
# bg = "#${color.hex.dark.base}";
|
||||||
fg = "#${color.hex.dark.text}";
|
# fg = "#${color.hex.dark.text}";
|
||||||
bold = false;
|
# bold = false;
|
||||||
};
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
# extraLuaPackages = with pkgs.lua51Packages; [];
|
# extraLuaPackages = with pkgs.lua51Packages; [];
|
||||||
@ -311,6 +311,7 @@ in {
|
|||||||
# https://github.com/catppuccin/nvim/tree/main?tab=readme-ov-file#integrations
|
# https://github.com/catppuccin/nvim/tree/main?tab=readme-ov-file#integrations
|
||||||
default_integrations = true;
|
default_integrations = true;
|
||||||
integrations = {
|
integrations = {
|
||||||
|
blink_cmp = true;
|
||||||
dashboard = true;
|
dashboard = true;
|
||||||
diffview = true;
|
diffview = true;
|
||||||
flash = true;
|
flash = true;
|
||||||
@ -377,27 +378,15 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO: Does not work with luasnips yet :(
|
|
||||||
# TODO: Check if plugin landed in repos
|
|
||||||
blink-cmp = rec {
|
blink-cmp = rec {
|
||||||
name = "blink.cmp";
|
name = "blink.cmp";
|
||||||
pkg = inputs.blink-cmp.packages.${system}.default;
|
# pkg = inputs.blink-cmp.packages.${system}.default;
|
||||||
|
pkg = pkgs.vimPlugins.blink-cmp;
|
||||||
lazy = true;
|
lazy = true;
|
||||||
event = ["InsertEnter"];
|
event = ["InsertEnter"];
|
||||||
config = mkDefaultConfig name;
|
config = mkDefaultConfig name;
|
||||||
opts = {
|
|
||||||
sources = {
|
|
||||||
providers.__raw = ''
|
|
||||||
{
|
|
||||||
{ 'blink.cmp.sources.lsp', name = 'LSP' },
|
|
||||||
{ 'blink.cmp.sources.path', name = 'Path', score_offset = 3 },
|
|
||||||
{ 'blink.cmp.sources.snippets', name = 'Snippets', score_offset = -3 },
|
|
||||||
|
|
||||||
-- Disable the buffer completion because I don't like it
|
opts = {
|
||||||
-- { 'blink.cmp.sources.buffer', name = 'Buffer', fallback_for = { 'LSP' } },
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
keymap = {
|
keymap = {
|
||||||
show = "<C-space>";
|
show = "<C-space>";
|
||||||
hide = "<C-e>";
|
hide = "<C-e>";
|
||||||
@ -413,7 +402,32 @@ in {
|
|||||||
snippet_forward = "<Tab>";
|
snippet_forward = "<Tab>";
|
||||||
snippet_backward = "<S-Tab>";
|
snippet_backward = "<S-Tab>";
|
||||||
};
|
};
|
||||||
nerd_font_variant = "mono";
|
|
||||||
|
accept = {
|
||||||
|
expand_snippet = "require('luasnip').lsp_expand";
|
||||||
|
auto_brackets = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
trigger = {
|
||||||
|
signature_help = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fuzzy = {
|
||||||
|
use_typo_resistance = true;
|
||||||
|
use_frequency = true;
|
||||||
|
use_proximity = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
completion = {
|
||||||
|
enabled_providers = ["lsp" "path" "snippets"]; # No "buffer"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
windows = {
|
windows = {
|
||||||
autocomplete = {
|
autocomplete = {
|
||||||
border = "rounded";
|
border = "rounded";
|
||||||
@ -427,17 +441,12 @@ in {
|
|||||||
signature_help = {
|
signature_help = {
|
||||||
border = "rounded";
|
border = "rounded";
|
||||||
};
|
};
|
||||||
};
|
ghost_text = {
|
||||||
accept = {
|
|
||||||
auto_brackets = {
|
|
||||||
enabled = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
trigger = {
|
|
||||||
signature_help = {
|
|
||||||
enabled = true;
|
enabled = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nerd_font_variant = "mono";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user