diff --git a/home/programs/dev/neovim/config.lua b/home/programs/dev/neovim/config.lua index d01d1d2..18f0fa9 100644 --- a/home/programs/dev/neovim/config.lua +++ b/home/programs/dev/neovim/config.lua @@ -77,6 +77,8 @@ cmp.setup({ sources = cmp.config.sources({ { name = "nvim_lsp" }, { name = "luasnip" }, + { name = "avante_commands" }, + { name = "avante_mentions" }, }, { { name = "buffer" }, { name = "path" }, @@ -107,9 +109,9 @@ lspconfig.nil_ls.setup({ capabilities = capabilities }) lspconfig.rust_analyzer.setup({ capabilities = capabilities }) lspconfig.pylsp.setup({ capabilities = capabilities }) lspconfig.stylelint_lsp.setup({ - cmd = { "stylelint-lsp", "--stdio" }, - filetypes = { "css", "scss", "rasi" }, - capabilities = vim.lsp.protocol.make_client_capabilities(), + cmd = { "stylelint-lsp", "--stdio" }, + filetypes = { "css", "scss", "rasi" }, + capabilities = vim.lsp.protocol.make_client_capabilities(), }) -- Conform @@ -149,6 +151,58 @@ vim.keymap.set("n", "fg", telescope.live_grep, { desc = "Telescope live vim.keymap.set("n", "fb", telescope.buffers, { desc = "Telescope buffers" }) vim.keymap.set("n", "fh", telescope.help_tags, { desc = "Telescope help tags" }) +-- Avante.nvim Setup +require("avante").setup({ + -- Provider configuration + provider = "ollama", + claude = { + endpoint = "https://api.anthropic.com", + model = "claude-sonnet-4-20250514", + }, + -- File selector settings + file_selector = { + provider = "telescope", + }, + -- Other settings + instructions_file = "avante.md", + -- Keymaps will be set automatically + mappings = { + ask = "aa", + edit = "ae", + refresh = "ar", + --- @class AvanteConflictMappings + diff = { + ours = "co", + theirs = "ct", + none = "c0", + both = "cb", + next = "]x", + prev = "[x", + }, + jump = { + next = "]]", + prev = "[[", + }, + }, +}) + +-- Img-clip setup for image pasting +require("img-clip").setup({ + default = { + embed_image_as_base64 = false, + prompt_for_file_name = false, + drag_and_drop = { + insert_mode = true, + }, + use_absolute_path = true, + }, +}) + +-- Render-markdown setup +require("render-markdown").setup({ + file_types = { "markdown", "Avante" }, +}) + -- Styling require("catppuccin").setup({ flavour = "mocha", diff --git a/home/programs/dev/neovim/default.nix b/home/programs/dev/neovim/default.nix index b8f9442..07dac37 100644 --- a/home/programs/dev/neovim/default.nix +++ b/home/programs/dev/neovim/default.nix @@ -25,7 +25,15 @@ alpha-nvim cheatsheet-nvim toggleterm-nvim - avante-nvim # AI Stuff + + # AI Stuff + avante-nvim + plenary-nvim + nui-nvim + dressing-nvim + nvim-web-devicons + img-clip-nvim + render-markdown-nvim # Add conform.nvim as a custom plugin (pkgs.vimUtils.buildVimPlugin { @@ -68,5 +76,8 @@ nil rust-analyzer python3Packages.python-lsp-server + # Avante + curl + cargo ]; } diff --git a/users/phil/config.jsonc b/users/phil/config.jsonc index 709b9d1..fb19768 100644 --- a/users/phil/config.jsonc +++ b/users/phil/config.jsonc @@ -169,7 +169,7 @@ "paddingLeft": 2, "symbol": "circle" }, - "break, + "break", ] } diff --git a/users/phil/home.nix b/users/phil/home.nix index 682dba8..5b71aaa 100644 --- a/users/phil/home.nix +++ b/users/phil/home.nix @@ -52,4 +52,5 @@ userEmail = "p.keier@beyerstedt-it.de"; }; + home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc; } diff --git a/users/phil/nixos.nix b/users/phil/nixos.nix index 395f0f0..e435f5d 100644 --- a/users/phil/nixos.nix +++ b/users/phil/nixos.nix @@ -27,8 +27,6 @@ ''; }; - home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc; - programs.fish = { enable = true; interactiveShellInit = ''