From 916fdf73e367f9507eb95d2686e9de9c6984fefa Mon Sep 17 00:00:00 2001 From: Zackarias Montell Date: Thu, 15 May 2025 13:59:35 +0200 Subject: [PATCH] Add python debugger support --- AppData/Local/nvim/init.lua | 3 ++- AppData/Local/nvim/lazy-lock.json | 1 + AppData/Local/nvim/lua/kickstart/plugins/debug.lua | 3 +++ requirements.ps1 | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/AppData/Local/nvim/init.lua b/AppData/Local/nvim/init.lua index a2ce81c..f6b316a 100644 --- a/AppData/Local/nvim/init.lua +++ b/AppData/Local/nvim/init.lua @@ -5,7 +5,7 @@ --local nvm_bin = os.getenv('nvm_home'):gsub('\n[^\n]*$', '') -- remove line endings --local node_version = vim.fn.system('nvm current'):gsub('\n[^\n]*$', '') -- remove line endings --local vue_typescript_plugin_path = vim.fs.normalize(nvm_bin .. '\\' .. node_version .. '\\node_modules\\@vue\\typescript-plugin') -local vue_typescript_plugin_path = vim.fs.normalize('~/node_modules/@vue/typescript-plugin') +local vue_typescript_plugin_path = vim.fs.normalize '~/node_modules/@vue/typescript-plugin' print(vue_typescript_plugin_path) @@ -600,6 +600,7 @@ require('lazy').setup({ 'xmlformatter', 'isort', 'black', + 'debugpy', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } -- Installed LSPs are configured and enabled automatically with mason-lspconfig diff --git a/AppData/Local/nvim/lazy-lock.json b/AppData/Local/nvim/lazy-lock.json index 65ac644..162d340 100644 --- a/AppData/Local/nvim/lazy-lock.json +++ b/AppData/Local/nvim/lazy-lock.json @@ -21,6 +21,7 @@ "nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" }, "nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" }, "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, + "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, "nvim-lint": { "branch": "master", "commit": "fdb04e9285edefbe25a02a31a35e8fbb10fe054d" }, "nvim-lspconfig": { "branch": "master", "commit": "ac1dfbe3b60e5e23a2cff90e3bd6a3bc88031a57" }, diff --git a/AppData/Local/nvim/lua/kickstart/plugins/debug.lua b/AppData/Local/nvim/lua/kickstart/plugins/debug.lua index 753cb0c..c916c73 100644 --- a/AppData/Local/nvim/lua/kickstart/plugins/debug.lua +++ b/AppData/Local/nvim/lua/kickstart/plugins/debug.lua @@ -23,6 +23,7 @@ return { -- Add your own debuggers here 'leoluz/nvim-dap-go', + 'mfussenegger/nvim-dap-python', }, keys = { -- Basic debugging keymaps, feel free to change to your liking! @@ -95,6 +96,7 @@ return { ensure_installed = { -- Update this to ensure that you have the debuggers for the langs you want 'delve', + 'debugpy', }, } @@ -144,5 +146,6 @@ return { detached = vim.fn.has 'win32' == 0, }, } + require('dap-python').setup 'python' end, } diff --git a/requirements.ps1 b/requirements.ps1 index 21529e4..bf2318f 100644 --- a/requirements.ps1 +++ b/requirements.ps1 @@ -32,6 +32,9 @@ npm install # mostly nvim deps ## Nvim requirements from choco, needs to be run as admin Start-Process pwsh -Verb RunAs -ArgumentList "-Command", "choco install make unzip ripgrep" +## Nvim requirements from pip +python -m pip install debugpy + Exit # extras, make flag for these