fix: lazy loading
This commit is contained in:
@@ -65,45 +65,74 @@ in
|
|||||||
ruff
|
ruff
|
||||||
];
|
];
|
||||||
|
|
||||||
# 3. Plugins (from startupPlugins & optionalPlugins)
|
# 3. Plugins
|
||||||
# Since you use lz.n in Lua, we just list them all here.
|
# Nix provisions plugins; lz.n controls when lazy specs are packadd'd.
|
||||||
# The wrapper will add them to the packpath.
|
|
||||||
specs = {
|
specs = {
|
||||||
# Core lazy-loading plugin
|
|
||||||
lz-n = {
|
lz-n = {
|
||||||
data = pkgs.vimPlugins.lz-n;
|
data = pkgs.vimPlugins.lz-n;
|
||||||
};
|
};
|
||||||
plenary = {
|
|
||||||
data = pkgs.vimPlugins.plenary-nvim;
|
|
||||||
};
|
|
||||||
|
|
||||||
# All other plugins
|
support = {
|
||||||
general = {
|
|
||||||
data = with pkgs.vimPlugins; [
|
data = with pkgs.vimPlugins; [
|
||||||
|
plenary-nvim
|
||||||
|
kanagawa-nvim
|
||||||
nvim-treesitter.withAllGrammars
|
nvim-treesitter.withAllGrammars
|
||||||
nvim-treesitter-textobjects
|
nvim-treesitter-textobjects
|
||||||
trouble-nvim
|
|
||||||
guess-indent-nvim
|
|
||||||
which-key-nvim
|
|
||||||
telescope-nvim
|
telescope-nvim
|
||||||
telescope-fzf-native-nvim
|
telescope-fzf-native-nvim
|
||||||
telescope-ui-select-nvim
|
telescope-ui-select-nvim
|
||||||
conform-nvim
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
completion = {
|
||||||
|
lazy = true;
|
||||||
|
data = with pkgs.vimPlugins; [
|
||||||
blink-cmp
|
blink-cmp
|
||||||
luasnip
|
luasnip
|
||||||
friendly-snippets
|
friendly-snippets
|
||||||
mini-nvim
|
colorful-menu-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
lazy = true;
|
||||||
|
data = with pkgs.vimPlugins; [
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
lazydev-nvim
|
lazydev-nvim
|
||||||
colorful-menu-nvim
|
trouble-nvim
|
||||||
|
typst-preview-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
formatting = {
|
||||||
|
lazy = true;
|
||||||
|
data = with pkgs.vimPlugins; [
|
||||||
|
conform-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
core = {
|
||||||
|
lazy = true;
|
||||||
|
data = with pkgs.vimPlugins; [
|
||||||
|
mini-nvim
|
||||||
|
guess-indent-nvim
|
||||||
|
direnv-vim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
ui = {
|
||||||
|
lazy = true;
|
||||||
|
data = with pkgs.vimPlugins; [
|
||||||
lualine-nvim
|
lualine-nvim
|
||||||
zen-mode-nvim
|
zen-mode-nvim
|
||||||
kanagawa-nvim
|
which-key-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
project = {
|
||||||
|
lazy = true;
|
||||||
|
data = with pkgs.vimPlugins; [
|
||||||
project-nvim
|
project-nvim
|
||||||
typst-preview-nvim
|
|
||||||
direnv-vim
|
|
||||||
codecompanion-nvim
|
|
||||||
copilot-lua
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,4 +8,3 @@ require("plugins.treesitter")
|
|||||||
require("plugins.telescope")
|
require("plugins.telescope")
|
||||||
require("plugins.ui")
|
require("plugins.ui")
|
||||||
require("plugins.core")
|
require("plugins.core")
|
||||||
require("plugins.ai")
|
|
||||||
|
|||||||
@@ -1,72 +0,0 @@
|
|||||||
require("lz.n").load({
|
|
||||||
{
|
|
||||||
"copilot.lua",
|
|
||||||
cmd = "Copilot",
|
|
||||||
event = "InsertEnter",
|
|
||||||
after = function()
|
|
||||||
require("copilot").setup({
|
|
||||||
-- Disable inline suggestions, let CodeCompanion (or blink) handle interactions
|
|
||||||
suggestion = { enabled = false },
|
|
||||||
panel = { enabled = false },
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"codecompanion.nvim",
|
|
||||||
cmd = { "CodeCompanion", "CodeCompanionChat", "CodeCompanionActions" },
|
|
||||||
keys = {
|
|
||||||
{ "<leader>aa", "<cmd>CodeCompanionChat Toggle<cr>", mode = { "n", "v" }, desc = "[A]I [A]ssistant" },
|
|
||||||
{ "<leader>ac", "<cmd>CodeCompanionActions<cr>", mode = { "n", "v" }, desc = "[A]I [C]ode Actions" },
|
|
||||||
},
|
|
||||||
after = function()
|
|
||||||
require("codecompanion").setup({
|
|
||||||
-- Set Gemini as the default strategy
|
|
||||||
strategies = {
|
|
||||||
chat = {
|
|
||||||
adapter = "gemini",
|
|
||||||
},
|
|
||||||
inline = {
|
|
||||||
adapter = "gemini",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- Configure all available adapters
|
|
||||||
adapters = {
|
|
||||||
copilot = function()
|
|
||||||
return require("codecompanion.adapters").extend("copilot", {
|
|
||||||
schema = {
|
|
||||||
model = {
|
|
||||||
default = "claude-3.5-sonnet", -- Good default for Copilot chat
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
gemini = function()
|
|
||||||
return require("codecompanion.adapters").extend("gemini", {
|
|
||||||
env = {
|
|
||||||
api_key = "GEMINI_API_KEY",
|
|
||||||
},
|
|
||||||
schema = {
|
|
||||||
model = {
|
|
||||||
default = "gemini-3.1-pro-preview",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
gemini_cli = function()
|
|
||||||
return require("codecompanion.adapters").extend("gemini_cli", {
|
|
||||||
-- Pass the model as a CLI argument
|
|
||||||
args = {
|
|
||||||
"--model",
|
|
||||||
"gemini-3.1-pro-preview",
|
|
||||||
},
|
|
||||||
-- Set authentication to use standard Google Login
|
|
||||||
env = {
|
|
||||||
auth_method = "oauth-personal",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -4,6 +4,7 @@ require("lz.n").load({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"luasnip",
|
"luasnip",
|
||||||
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
before = function()
|
before = function()
|
||||||
require("lz.n").trigger_load("friendly-snippets")
|
require("lz.n").trigger_load("friendly-snippets")
|
||||||
end,
|
end,
|
||||||
@@ -15,6 +16,7 @@ require("lz.n").load({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"colorful-menu.nvim",
|
"colorful-menu.nvim",
|
||||||
|
event = { "InsertEnter", "CmdlineEnter" },
|
||||||
after = function()
|
after = function()
|
||||||
require("colorful-menu").setup({})
|
require("colorful-menu").setup({})
|
||||||
end,
|
end,
|
||||||
@@ -101,4 +103,3 @@ require("lz.n").load({
|
|||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
require("lz.n").load({})
|
|
||||||
Reference in New Issue
Block a user