From 0787439a427a500b236cadd9c2b9fcffdd34d157 Mon Sep 17 00:00:00 2001 From: Aniket Patel Date: Wed, 28 Aug 2024 23:51:49 +0530 Subject: [PATCH] added python debugger --- init.lua | 4 ++-- lua/kickstart/plugins/debug.lua | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 21616b30..94ce4bcd 100644 --- a/init.lua +++ b/init.lua @@ -921,9 +921,9 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', + require 'kickstart.plugins.debug', require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', + require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 196f2c6d..19ba5434 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -23,6 +23,7 @@ return { -- Add your own debuggers here 'leoluz/nvim-dap-go', + 'mfussenegger/nvim-dap-python', }, keys = function(_, keys) local dap = require 'dap' @@ -64,6 +65,7 @@ return { ensure_installed = { -- Update this to ensure that you have the debuggers for the langs you want 'delve', + 'python', }, } @@ -101,5 +103,9 @@ return { detached = vim.fn.has 'win32' == 0, }, } + + -- uses the debugypy installation by mason + local debugpyPythonPath = require('mason-registry').get_package('debugpy'):get_install_path() .. '/venv/bin/python3' + require('dap-python').setup(debugpyPythonPath, {}) ---@diagnostic disable-line: missing-fields end, }