bring back copilot

This commit is contained in:
EdenQwQ 2025-05-20 14:54:01 +08:00
parent b97d60f61f
commit 3187a83223
2 changed files with 35 additions and 24 deletions

View file

@ -13,33 +13,43 @@ let
in
{
programs.nixvim = {
extraPlugins = [
(pkgs.vimUtils.buildVimPlugin {
name = "fittencode";
src = pkgs.fetchFromGitHub {
owner = "luozhiya";
repo = "fittencode.nvim";
rev = "a52440968404917d0a3625a60c809edf65e52787";
hash = "sha256-Xw34CLaVIXDbX6knW9TZgE0eaz6bT4UGKiBHesH/KcQ=";
};
})
];
extraConfigLua =
# lua
''
require("fittencode").setup({
completion_mode = "inline",
keymaps = {
inline = {
["<C-L>"] = "accept_all_suggestions",
},
},
})
'';
# extraPlugins = [
# (pkgs.vimUtils.buildVimPlugin {
# name = "fittencode";
# src = pkgs.fetchFromGitHub {
# owner = "luozhiya";
# repo = "fittencode.nvim";
# rev = "a52440968404917d0a3625a60c809edf65e52787";
# hash = "sha256-Xw34CLaVIXDbX6knW9TZgE0eaz6bT4UGKiBHesH/KcQ=";
# };
# })
# ];
# extraConfigLua =
# # lua
# ''
# require("fittencode").setup({
# completion_mode = "inline",
# keymaps = {
# inline = {
# ["<C-L>"] = "accept_all_suggestions",
# },
# },
# })
# '';
plugins = {
copilot-lua = {
enable = true;
settings = {
panel.enabled = false;
suggestion.enabled = false;
filetypes.markdown = true;
};
};
copilot-cmp.enable = true;
cmp.settings.sources = [
{
name = "fittencode";
# name = "fittencode";
name = "copilot";
group_index = 1;
}
];

View file

@ -21,6 +21,7 @@
performance.combinePlugins = {
enable = true;
standalonePlugins = [
"copilot.lua"
"nvim-treesitter"
];
};