2024-12-19 13:59:35 +01:00
|
|
|
{ lib, pkgs, inputs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
home-manager.users.moritz.programs.nixvim = {
|
|
|
|
extraPlugins = [
|
|
|
|
(pkgs.vimUtils.buildVimPlugin {
|
|
|
|
pname = "blink-compat";
|
|
|
|
src = inputs.blink-compat;
|
|
|
|
version = lib.my.mkVersionInput inputs.blink-compat;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
extraConfigLuaPre = ''
|
|
|
|
require("blink.compat").setup({
|
|
|
|
impersonate_nvim_cmp = true
|
|
|
|
})
|
|
|
|
'';
|
2024-12-19 14:34:02 +01:00
|
|
|
plugins.lsp.capabilities = /* lua */ ''
|
|
|
|
capabilities = require('blink.cmp').get_lsp_capabilities(capabilities)
|
|
|
|
'';
|
2024-12-19 13:59:35 +01:00
|
|
|
plugins.blink-cmp = {
|
|
|
|
enable = true;
|
|
|
|
package = inputs.blink-cmp.packages.${pkgs.system}.blink-cmp;
|
|
|
|
settings = {
|
|
|
|
keymap = {
|
2024-12-19 14:34:30 +01:00
|
|
|
preset = "default";
|
2024-12-19 13:59:35 +01:00
|
|
|
};
|
|
|
|
appearance.nerd_font_variant = "mono";
|
|
|
|
sources = {
|
|
|
|
default = [
|
|
|
|
"lsp"
|
|
|
|
"path"
|
|
|
|
"luasnip"
|
|
|
|
"buffer"
|
|
|
|
"vimtex"
|
|
|
|
];
|
|
|
|
providers.vimtex = {
|
|
|
|
name = "vimtex";
|
|
|
|
module = "blink.compat.source";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
signature.enabled = true;
|
|
|
|
completion.documentation.auto_show = true;
|
|
|
|
completion.accept.auto_brackets.enabled = true;
|
|
|
|
snippets = {
|
|
|
|
expand.__raw = ''require("luasnip").lsp_expand'';
|
|
|
|
active.__raw = ''
|
|
|
|
function(filter)
|
|
|
|
if filter and filter.direction then
|
|
|
|
return require('luasnip').jumpable(filter.direction)
|
|
|
|
end
|
|
|
|
return require('luasnip').in_snippet()
|
|
|
|
end
|
|
|
|
'';
|
|
|
|
jump.__raw = ''require("luasnip").jump'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|