added python debugger

This commit is contained in:
Aniket Patel 2024-08-28 23:51:49 +05:30
parent 4ae9092acc
commit 0787439a42
2 changed files with 8 additions and 2 deletions

View File

@ -921,9 +921,9 @@ require('lazy').setup({
-- Here are some example plugins that I've included in the Kickstart repository. -- 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). -- 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.indent_line',
-- require 'kickstart.plugins.lint', require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

View File

@ -23,6 +23,7 @@ return {
-- Add your own debuggers here -- Add your own debuggers here
'leoluz/nvim-dap-go', 'leoluz/nvim-dap-go',
'mfussenegger/nvim-dap-python',
}, },
keys = function(_, keys) keys = function(_, keys)
local dap = require 'dap' local dap = require 'dap'
@ -64,6 +65,7 @@ return {
ensure_installed = { ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want -- Update this to ensure that you have the debuggers for the langs you want
'delve', 'delve',
'python',
}, },
} }
@ -101,5 +103,9 @@ return {
detached = vim.fn.has 'win32' == 0, 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, end,
} }