Remove codecompanion and debug stuff, not really in use

This commit is contained in:
c-salomonsen
2025-09-13 02:08:31 +02:00
parent 3eb6fe5743
commit 5b68fda6bb
4 changed files with 1 additions and 223 deletions

View File

@@ -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",
},
}

View File

@@ -64,83 +64,6 @@ map("n", "<leader>qd", function()
require("persistence").stop() require("persistence").stop()
end, { desc = "Stop persistence" }) end, { desc = "Stop persistence" })
-- debug related stuff
local dap = require "dap"
map("n", "<leader>db", function()
dap.toggle_breakpoint()
end, { desc = "Toggle breakpoint" })
map("n", "<leader>dc", function()
dap.continue()
end, { desc = "Continue" })
map("n", "<leader>dr", function()
dap.repl.open()
end, { desc = "Open REPL" })
map("n", "<leader>ds", function()
dap.step_over()
end, { desc = "Step over" })
map("n", "<leader>di", function()
dap.step_into()
end, { desc = "Step into" })
map("n", "<leader>do", function()
dap.step_out()
end, { desc = "Step out" })
map("n", "<leader>dT", function()
dap.terminate()
end, { desc = "Terminate" })
map("n", "<leader>dl", function()
dap.run_last()
end, { desc = "Run Last" })
map("n", "<leader>dC", function()
dap.run_to_cursor()
end, { desc = "Run to Cursor" })
-- dapui
local dapui = require "dapui"
local widgets = require "dap.ui.widgets"
map("n", "<leader>du", function()
dapui.toggle()
end, { desc = "Toggle UI" })
map({ "n", "v" }, "<Leader>dh", function()
widgets.hover()
end, { desc = "Hover" })
map({ "n", "v" }, "<Leader>dp", function()
widgets.preview()
end, { desc = "Preview" })
map("n", "<Leader>df", function()
widgets.centered_float(widgets.frames)
end, { desc = "Frames" })
map("n", "<Leader>ds", function()
widgets.centered_float(widgets.scopes)
end, { desc = "Scopes" })
-- CodeCompletion mappings
map({ "n", "v" }, "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true, desc = "Code Actions" })
map({ "n", "v" }, "<Leader>a", "<cmd>CodeCompanionChat Toggle<cr>", { noremap = true, silent = true, desc = "Code Chat" })
map("v", "ga", "<cmd>CodeCompanionChat Add<cr>", { noremap = true, silent = true, desc = "Code Chat Add Visual" })
map("v", "<Leader>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 -- mappings for wiki.vim
map("n", "<leader>iw", function () map("n", "<leader>iw", function ()
require("telescope.builtin").live_grep({ require("telescope.builtin").live_grep({

View File

@@ -40,15 +40,7 @@ vim.api.nvim_create_autocmd("textyankpost", {
pattern = "*", pattern = "*",
}) })
-- dap -- Surround
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' })
vim.api.nvim_create_autocmd("QuickFixCmdPost", { vim.api.nvim_create_autocmd("QuickFixCmdPost", {
callback = function() callback = function()

View File

@@ -15,22 +15,6 @@ return {
end, 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", "lervag/wiki.vim",
lazy = false, lazy = false,
@@ -41,56 +25,6 @@ return {
lazy = false, 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", "mfussenegger/nvim-lint",
lazy = true, lazy = true,
@@ -137,11 +71,6 @@ return {
end, end,
}, },
{
"folke/persistence.nvim",
event = "BufReadPre", -- this will only start session saving when an actual file was opened
},
{ {
"NvChad/nvcommunity", "NvChad/nvcommunity",
{ import = "nvcommunity.git.diffview" }, { import = "nvcommunity.git.diffview" },
@@ -224,18 +153,6 @@ return {
end, 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", "max397574/better-escape.nvim",
event = "InsertEnter", event = "InsertEnter",