diff --git a/lua/configs/codecompanion.lua b/lua/configs/codecompanion.lua deleted file mode 100644 index 1ff85c2..0000000 --- a/lua/configs/codecompanion.lua +++ /dev/null @@ -1,54 +0,0 @@ -local cc = require "codecompanion" -cc.setup { - adapters = { - llama3 = function() - return require("codecompanion.adapters").extend("ollama", { - name = "llama3", - schema = { - model = { - default = "llama3.1:latest", - }, - }, - }) - end, - mistral = function() - return require("codecompanion.adapters").extend("ollama", { - name = "mistral", - schema = { - model = { - default = "mistral:latest", - }, - }, - }) - end, - qwen = function() - return require("codecompanion.adapters").extend("ollama", { - name = "qwen", - schema = { - model = { - default = "qwen2.5-coder", - }, - }, - }) - end, - }, - strategies = { - chat = { - adapter = "copilot", - }, - inline = { - adapter = "copilot", - }, - }, - display = { - -- diff = { - -- provider = "mini_diff", - -- }, - action_palette = { - provider = "mini_pick", - }, - }, - opts = { - log_level = "DEBUG", - }, -} diff --git a/lua/mappings.lua b/lua/mappings.lua index 0334a1f..4b5c650 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -64,83 +64,6 @@ map("n", "qd", function() require("persistence").stop() end, { desc = "Stop persistence" }) --- debug related stuff -local dap = require "dap" - -map("n", "db", function() - dap.toggle_breakpoint() -end, { desc = "Toggle breakpoint" }) - -map("n", "dc", function() - dap.continue() -end, { desc = "Continue" }) - -map("n", "dr", function() - dap.repl.open() -end, { desc = "Open REPL" }) - -map("n", "ds", function() - dap.step_over() -end, { desc = "Step over" }) - -map("n", "di", function() - dap.step_into() -end, { desc = "Step into" }) - -map("n", "do", function() - dap.step_out() -end, { desc = "Step out" }) - -map("n", "dT", function() - dap.terminate() -end, { desc = "Terminate" }) - -map("n", "dl", function() - dap.run_last() -end, { desc = "Run Last" }) - -map("n", "dC", function() - dap.run_to_cursor() -end, { desc = "Run to Cursor" }) - --- dapui - -local dapui = require "dapui" -local widgets = require "dap.ui.widgets" - -map("n", "du", function() - dapui.toggle() -end, { desc = "Toggle UI" }) - -map({ "n", "v" }, "dh", function() - widgets.hover() -end, { desc = "Hover" }) - -map({ "n", "v" }, "dp", function() - widgets.preview() -end, { desc = "Preview" }) - -map("n", "df", function() - widgets.centered_float(widgets.frames) -end, { desc = "Frames" }) - -map("n", "ds", function() - widgets.centered_float(widgets.scopes) -end, { desc = "Scopes" }) - --- CodeCompletion mappings - -map({ "n", "v" }, "", "CodeCompanionActions", { noremap = true, silent = true, desc = "Code Actions" }) -map({ "n", "v" }, "a", "CodeCompanionChat Toggle", { noremap = true, silent = true, desc = "Code Chat" }) -map("v", "ga", "CodeCompanionChat Add", { noremap = true, silent = true, desc = "Code Chat Add Visual" }) -map("v", "ce", function() - require("codecompanion").prompt("explain") -end, { noremap = true, silent = true, desc = "Explain Selection" } -) - --- Expand 'cc' into 'CodeCompanion' in the command line -vim.cmd([[cab cc CodeCompanion]]) - -- mappings for wiki.vim map("n", "iw", function () require("telescope.builtin").live_grep({ diff --git a/lua/options.lua b/lua/options.lua index ad6d2b6..0df2afd 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -40,15 +40,7 @@ vim.api.nvim_create_autocmd("textyankpost", { pattern = "*", }) --- dap -require "dap" - -local sign = vim.fn.sign_define - -sign("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = ""}) -sign("DapBreakpointCondition", { text = "●", texthl = "DapBreakpointCondition", linehl = "", numhl = ""}) -sign("DapLogPoint", { text = "◆", texthl = "DapLogPoint", linehl = "", numhl = ""}) -sign('DapStopped', { text='', texthl='DapStopped', linehl='DapStopped', numhl= 'DapStopped' }) +-- Surround vim.api.nvim_create_autocmd("QuickFixCmdPost", { callback = function() diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index d47b4ae..61c4b58 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -15,22 +15,6 @@ return { end, }, - { - "vim-test/vim-test", - lazy = false, - config = function() - vim.g["test#use_quickfix"] = 1 - vim.g["test#strategy"] = "neovim_sticky" - vim.g["test#python#runner"] = "pytest" - vim.g["test#python#pytest#executable"] = "uv run pytest" - end, - }, - - { - "mfussenegger/nvim-dap", - lazy = true, - }, - { "lervag/wiki.vim", lazy = false, @@ -41,56 +25,6 @@ return { lazy = false, }, - { - "jay-babu/mason-nvim-dap.nvim", - opts = { - handlers = {}, - automatic_installations = { - exclude = { - "python", - }, - }, - ensure_installed = { - "python", - }, - }, - dependencies = { - "mfussenegger/nvim-dap", - "williamboman/mason.nvim", - }, - }, - - { - "mfussenegger/nvim-dap-python", - lazy = true, - config = function() - local python = vim.fn.expand "~/.local/share/nvim/mason/packages/debugpy/venv/bin/python" - require("dap-python").setup(python) - end, - dependencies = { - "mfussenegger/nvim-dap", - }, - }, - - { - "theHamsta/nvim-dap-virtual-text", - config = true, - dependencies = { - "mfussenegger/nvim-dap", - }, - }, - - { - "rcarriga/nvim-dap-ui", - config = true, - dependencies = { - "mfussenegger/nvim-dap", - "mfussenegger/nvim-dap-python", - "nvim-neotest/nvim-nio", - "theHamsta/nvim-dap-virtual-text", - }, - }, - { "mfussenegger/nvim-lint", lazy = true, @@ -137,11 +71,6 @@ return { end, }, - { - "folke/persistence.nvim", - event = "BufReadPre", -- this will only start session saving when an actual file was opened - }, - { "NvChad/nvcommunity", { import = "nvcommunity.git.diffview" }, @@ -224,18 +153,6 @@ return { end, }, - { - "olimorris/codecompanion.nvim", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - }, - config = function() - require "configs.codecompanion" - end, - lazy = false, - }, - { "max397574/better-escape.nvim", event = "InsertEnter",