diff --git a/flake.lock b/flake.lock index ef0ed2d..8f95590 100644 --- a/flake.lock +++ b/flake.lock @@ -799,6 +799,22 @@ "type": "github" } }, + "nvim_plugin-sudo-tee/opencode.nvim": { + "flake": false, + "locked": { + "lastModified": 1753448638, + "narHash": "sha256-3jtYKx7GVUnBrMs7hq91DbAiJkxXNLWZDi02UW8TTI0=", + "owner": "sudo-tee", + "repo": "opencode.nvim", + "rev": "99d9020957cd5a4c34e0c43c9965aab751dca3ca", + "type": "github" + }, + "original": { + "owner": "sudo-tee", + "repo": "opencode.nvim", + "type": "github" + } + }, "nvim_plugin-tpope/vim-sleuth": { "flake": false, "locked": { @@ -963,6 +979,7 @@ "nvim_plugin-sindrets/diffview.nvim": "nvim_plugin-sindrets/diffview.nvim", "nvim_plugin-stevearc/conform.nvim": "nvim_plugin-stevearc/conform.nvim", "nvim_plugin-stevearc/dressing.nvim": "nvim_plugin-stevearc/dressing.nvim", + "nvim_plugin-sudo-tee/opencode.nvim": "nvim_plugin-sudo-tee/opencode.nvim", "nvim_plugin-tpope/vim-sleuth": "nvim_plugin-tpope/vim-sleuth", "nvim_plugin-tpope/vim-surround": "nvim_plugin-tpope/vim-surround", "nvim_plugin-uga-rosa/ccc.nvim": "nvim_plugin-uga-rosa/ccc.nvim", diff --git a/flake.nix b/flake.nix index 84343c3..7727fea 100644 --- a/flake.nix +++ b/flake.nix @@ -114,10 +114,6 @@ "nvim_plugin-zbirenbaum/copilot.lua".flake = false; "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim".url = "github:CopilotC-Nvim/CopilotChat.nvim"; "nvim_plugin-CopilotC-Nvim/CopilotChat.nvim".flake = false; - "nvim_plugin-yetone/avante.nvim".url = "github:yetone/avante.nvim"; - "nvim_plugin-yetone/avante.nvim".flake = false; - # "nvim_plugin-HakonHarnes/img-clip.nvim".url = "github:HakonHarnes/img-clip.nvim"; - # "nvim_plugin-HakonHarnes/img-clip.nvim".flake = false; "nvim_plugin-stevearc/dressing.nvim".url = "github:stevearc/dressing.nvim"; "nvim_plugin-stevearc/dressing.nvim".flake = false; "nvim_plugin-folke/neodev.nvim".url = "github:folke/neodev.nvim"; @@ -132,8 +128,6 @@ "nvim_plugin-ron/ron.vim".flake = false; "nvim_plugin-nosduco/remote-sshfs.nvim".url = "github:nosduco/remote-sshfs.nvim"; "nvim_plugin-nosduco/remote-sshfs.nvim".flake = false; - # "nvim_plugin-supermaven-inc/supermaven-nvim".url = "github:supermaven-inc/supermaven-nvim"; - # "nvim_plugin-supermaven-inc/supermaven-nvim".flake = false; }; outputs = { @@ -176,43 +170,43 @@ "nvim_plugin-nvim-treesitter/nvim-treesitter" = nvim-treesitter.withAllGrammars; }; - avante-nvim-lib = pkgs.rustPlatform.buildRustPackage { - pname = "avante-nvim-lib"; - version = "0.0.0"; - src = inputs."nvim_plugin-yetone/avante.nvim"; - - buildFeatures = [ "luajit" ]; - doCheck = false; - cargoLock = { - lockFile = inputs."nvim_plugin-yetone/avante.nvim" + "/Cargo.lock"; - allowBuiltinFetchGit = true; - }; - - nativeBuildInputs = with pkgs; [ - pkg-config - ]; - - buildInputs = with pkgs; [ - openssl.dev - ]; - env = { - OPENSSL_NO_VENDOR = "1"; - OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; - OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; - OPENSSL_DIR = "${pkgs.openssl.dev}"; - }; - postInstall = '' - # mv $out/lib/libavante_repo_map.so $out/lib/avante_repo_map.so - for f in $out/lib/lib*; do - mv "$f" "$out/lib/''${f##*/lib}" - done - ''; - meta = { - description = "Avante nvim libraries"; - homepage = "https://github.com/yetone/avante.nvim"; - license = pkgs.lib.licenses.asl20; - }; - }; + # avante-nvim-lib = pkgs.rustPlatform.buildRustPackage { + # pname = "avante-nvim-lib"; + # version = "0.0.0"; + # src = inputs."nvim_plugin-yetone/avante.nvim"; + # + # buildFeatures = [ "luajit" ]; + # doCheck = false; + # cargoLock = { + # lockFile = inputs."nvim_plugin-yetone/avante.nvim" + "/Cargo.lock"; + # allowBuiltinFetchGit = true; + # }; + # + # nativeBuildInputs = with pkgs; [ + # pkg-config + # ]; + # + # buildInputs = with pkgs; [ + # openssl.dev + # ]; + # env = { + # OPENSSL_NO_VENDOR = "1"; + # OPENSSL_LIB_DIR = "${pkgs.openssl.out}/lib"; + # OPENSSL_INCLUDE_DIR = "${pkgs.openssl.dev}/include"; + # OPENSSL_DIR = "${pkgs.openssl.dev}"; + # }; + # postInstall = '' + # # mv $out/lib/libavante_repo_map.so $out/lib/avante_repo_map.so + # for f in $out/lib/lib*; do + # mv "$f" "$out/lib/''${f##*/lib}" + # done + # ''; + # meta = { + # description = "Avante nvim libraries"; + # homepage = "https://github.com/yetone/avante.nvim"; + # license = pkgs.lib.licenses.asl20; + # }; + # }; # This will be how we put any nix related stuff into our lua config luaNixGlobal = @@ -321,22 +315,22 @@ "LAZY" "${lazyPath}" ] - ++ [ - # Link avante libraries - "--prefix" - "LD_LIBRARY_PATH" - ":" - "${avante-nvim-lib}/lib" - # Add Lua C modules path TODO make these conditional so on linux, and dylib for mac it shouldn't be both... - "--prefix" - "LUA_CPATH" - ";" - "${avante-nvim-lib}/lib/?.so" - "--prefix" - "LUA_CPATH" - ";" - "${avante-nvim-lib}/lib/?.dylib" - ] + # ++ [ + # # Link avante libraries + # "--prefix" + # "LD_LIBRARY_PATH" + # ":" + # "${avante-nvim-lib}/lib" + # # Add Lua C modules path TODO make these conditional so on linux, and dylib for mac it shouldn't be both... + # "--prefix" + # "LUA_CPATH" + # ";" + # "${avante-nvim-lib}/lib/?.so" + # "--prefix" + # "LUA_CPATH" + # ";" + # "${avante-nvim-lib}/lib/?.dylib" + # ] ++ [ # Don't use default directories to not collide with another neovim config # All things at runtime should be deletable since we are using nix to handle downloads and bins diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua deleted file mode 100644 index 0e9714a..0000000 --- a/lua/plugins/avante.lua +++ /dev/null @@ -1,117 +0,0 @@ -return { - "yetone/avante.nvim", - dependencies = (function() - local deps = { - "nvim-treesitter/nvim-treesitter", - "stevearc/dressing.nvim", - "nvim-lua/plenary.nvim", - "MunifTanjim/nui.nvim", - -- { - -- "HakonHarnes/img-clip.nvim", - -- event = "VeryLazy", - -- opts = { - -- default = { - -- embed_image_as_base64 = false, - -- prompt_for_file_name = false, - -- drag_and_drop = { - -- insert_mode = true, - -- }, - -- use_absolute_path = true, - -- }, - -- }, - -- }, - } - -- Only add copilot if ANTHROPIC_API_KEY is not set - if os.getenv("ANTHROPIC_API_KEY") == nil then - table.insert(deps, "zbirenbaum/copilot.lua") - end - return deps - end)(), - event = "VeryLazy", - build = function() - if not NIX then - vim.fn.system("make") - end - end, - lazy = false, - opts = function() - -- local provider = os.getenv("ANTHROPIC_API_KEY") and "claude" or "copilot" - return { - provider = "copilot", - auto_suggestions_provider = "copilot", - providers = { - morph = { - model = "auto", - }, - -- ollama = { - -- endpoint = "http://100.64.0.6:11434/", -- Note that there is no /v1 at the end. - -- model = "gemma3:12b", - -- }, - -- ollamafast = { - -- __inherited_from = "ollama", - -- endpoint = "http://100.64.0.6:11434/", -- Note that there is no /v1 at the end. - -- model = "gemma3:4b", - -- }, - }, - hints = { enabled = false }, - behavior = { - enable_fastapply = true, - auto_suggestions = true, - auto_set_highlight_group = true, - auto_set_keymaps = false, - support_paste_from_clipboard = true, - auto_apply_diff_after_generation = false, - minimize_diff = true, - }, - suggestion = { - debounce = 200, - throttle = 200, - }, - windows = { - position = "right", - wrap = true, - input = { prefix = "" }, - }, - mappings = { - ask = "", - edit = "", - refresh = "r", - focus = "f", - toggle = { - default = "c", - debug = "", - hint = "", - suggestion = "S", - repomap = "R", - }, - }, - } - end, - config = function(_, opts) - require("avante_lib").load() - require("avante").setup(opts) - end, - keys = { - { - "c", - "AvanteToggle", - desc = "Avante - Toggle Chat", - mode = { "n", "v", "x" }, - }, - { - "e", - "AvanteEdit", - desc = "Avante - Edit Selection", - mode = { "v", "x" }, - }, - { - "e", - function() - vim.cmd("normal! ggVG") - vim.cmd("AvanteEdit") - end, - desc = "Avante - Edit File", - mode = { "n" }, - }, - }, -} diff --git a/lua/plugins_disabled/supermaven.lua b/lua/plugins_disabled/supermaven.lua deleted file mode 100644 index 57d672c..0000000 --- a/lua/plugins_disabled/supermaven.lua +++ /dev/null @@ -1,18 +0,0 @@ -return { - "supermaven-inc/supermaven-nvim", - event = "VeryLazy", - opts = { - keymaps = { - accept_suggestion = "", - -- clear_suggestion = "", - accept_word = "", - }, - ignore_filetypes = { "age" }, - -- disable_inline_completion = true, - -- disable_keymaps = true, - condition = function() - local matches = vim.fn.expand("%:t"):match("^%.env") or vim.fn.expand("%:t"):match("^%.envrc") - return not matches - end, - }, -}