Merge pull request #1 from fernandom06/config-python-dap
Config python dap
This commit is contained in:
		
						commit
						6db2657739
					
				
							
								
								
									
										2
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										2
									
								
								init.lua
								
								
								
								
							| 
						 | 
				
			
			@ -558,6 +558,7 @@ require('lazy').setup({
 | 
			
		|||
        -- clangd = {},
 | 
			
		||||
        -- gopls = {},
 | 
			
		||||
        pyright = {},
 | 
			
		||||
        ruff = {},
 | 
			
		||||
        taplo = {}, -- LSP for toml files
 | 
			
		||||
        -- rust_analyzer = {},
 | 
			
		||||
        -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
 | 
			
		||||
| 
						 | 
				
			
			@ -721,6 +722,7 @@ require('lazy').setup({
 | 
			
		|||
          --  This will auto-import if your LSP supports it.
 | 
			
		||||
          --  This will expand snippets if the LSP sent a snippet.
 | 
			
		||||
          ['<C-y>'] = cmp.mapping.confirm { select = true },
 | 
			
		||||
          ['<CR>'] = cmp.mapping.confirm { select = true },
 | 
			
		||||
 | 
			
		||||
          -- Manually trigger a completion from nvim-cmp.
 | 
			
		||||
          --  Generally you don't need this, because nvim-cmp will display
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,6 +2,7 @@ return {
 | 
			
		|||
  'linux-cultist/venv-selector.nvim',
 | 
			
		||||
  dependencies = { 'neovim/nvim-lspconfig', 'nvim-telescope/telescope.nvim', 'mfussenegger/nvim-dap-python' },
 | 
			
		||||
  opts = {
 | 
			
		||||
    dap_enabled = true, -- makes the debugger work with venv
 | 
			
		||||
    -- Your options go here
 | 
			
		||||
    -- name = "venv",
 | 
			
		||||
    -- auto_refresh = false
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,6 +23,7 @@ return {
 | 
			
		|||
 | 
			
		||||
    -- Add your own debuggers here
 | 
			
		||||
    'leoluz/nvim-dap-go',
 | 
			
		||||
    'mfussenegger/nvim-dap-python'
 | 
			
		||||
  },
 | 
			
		||||
  config = function()
 | 
			
		||||
    local dap = require 'dap'
 | 
			
		||||
| 
						 | 
				
			
			@ -42,6 +43,7 @@ return {
 | 
			
		|||
      ensure_installed = {
 | 
			
		||||
        -- Update this to ensure that you have the debuggers for the langs you want
 | 
			
		||||
        'delve',
 | 
			
		||||
        'debugpy'
 | 
			
		||||
      },
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -83,8 +85,10 @@ return {
 | 
			
		|||
    dap.listeners.after.event_initialized['dapui_config'] = dapui.open
 | 
			
		||||
    dap.listeners.before.event_terminated['dapui_config'] = dapui.close
 | 
			
		||||
    dap.listeners.before.event_exited['dapui_config'] = dapui.close
 | 
			
		||||
    local debugpyPythonPath = require("mason-registry").get_package("debugpy"):get_install_path() .. "/venv/bin/python3"
 | 
			
		||||
 | 
			
		||||
    -- Install golang specific config
 | 
			
		||||
    require('dap-go').setup()
 | 
			
		||||
    require("dap-python").setup(debugpyPythonPath, {})
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue