From 0d968fd283638e1ab5a3349a111ba379714e2fcb Mon Sep 17 00:00:00 2001 From: flin16 Date: Sat, 14 Jun 2025 21:42:47 -0500 Subject: [PATCH] Change copilot & dap config Move them to plugin 1. dap need to be loaded before it is configured 2. Copilot command is missing, so we use canonical setup --- lua/config/options.lua | 19 ------------------- lua/plugins/example.lua | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/lua/config/options.lua b/lua/config/options.lua index 0cf8b80..b79ca3e 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -6,24 +6,5 @@ if vim.fn.has("gui_running") == 1 then vim.o.clipboard = "" end vim.g.copilot_no_tab_map = true -vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', { silent = true, expr = true }) vim.o.guifont = "Monaco:h16" vim.cmd("set wrap") -local dap = require("dap") -dap.adapters.python = { - type = "executable", - command = "python", - args = { "-m", "debugpy.adapter" }, -} - -dap.configurations.python = { - { - type = "python", - request = "launch", - name = "Launch file", - program = "${file}", - pythonPath = function() - return "python" - end, - }, -} diff --git a/lua/plugins/example.lua b/lua/plugins/example.lua index 93b769d..0226133 100644 --- a/lua/plugins/example.lua +++ b/lua/plugins/example.lua @@ -14,6 +14,29 @@ return { kind_filter = { tex = true }, }, }, + { + "mfussenegger/nvim-dap", + config = function() + local dap = require("dap") + dap.adapters.python = { + type = "executable", + command = "python", + args = { "-m", "debugpy.adapter" }, + } + + dap.configurations.python = { + { + type = "python", + request = "launch", + name = "Launch file", + program = "${file}", + pythonPath = function() + return "python" + end, + }, + } + end, + }, { "tomasr/molokai", -- colorscheme -- config = function() @@ -225,6 +248,9 @@ return { markdown = true, help = true, }, + keymap = { + accept = "", + }, }, }, {