Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dap strategy: empty console and noise in the repl #50

Open
azmeuk opened this issue Jul 17, 2023 · 0 comments
Open

dap strategy: empty console and noise in the repl #50

azmeuk opened this issue Jul 17, 2023 · 0 comments

Comments

@azmeuk
Copy link

azmeuk commented Jul 17, 2023

Hi.
I am not really which neovim plugin is responsible for this behavior, but I can move this issue elsewhere if this does not fall on the side of neotest-python.

Why a pretty default configuration, running a test with lua require("neotest").run.run({strategy = "dap"}) displays:

  • nothing in the console
  • the pytest initialization output in the repl

Capture d’écran du 2023-07-17 17-59-06

I am not sure this is wanted. Naively I would have expected all the output in the console.

my configuration
vim.cmd [[packadd packer.nvim]]

return require('packer').startup(function(use)
    -- Packer can manage itself
    use 'wbthomason/packer.nvim'

    -- syntax highlighting
    use {
        'nvim-treesitter/nvim-treesitter',
        run = function()
            local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
            ts_update()
        end,
    }

    -- display the current functions/loops etc
    use "nvim-treesitter/nvim-treesitter-context"

    -- basic configuration to use LSP
    use {
        'VonHeikemen/lsp-zero.nvim',
        branch = 'v2.x',
        requires = {
            -- LSP Support
            {'neovim/nvim-lspconfig'},
            {
              'williamboman/mason.nvim',
              build = function()
                pcall(vim.cmd, 'MasonUpdate')
              end,
            },
            {'williamboman/mason-lspconfig.nvim'},

            -- Autocompletion
            {'hrsh7th/nvim-cmp'},
            {'hrsh7th/cmp-buffer'},
            {'hrsh7th/cmp-path'},
            {'saadparwaiz1/cmp_luasnip'},
            {'hrsh7th/cmp-nvim-lsp'},
            {'hrsh7th/cmp-nvim-lua'},

            -- Snippets
            {'L3MON4D3/LuaSnip'},
            {'rafamadriz/friendly-snippets'},
        }
    }

    -- unit tests with vim
    use {
        "nvim-neotest/neotest",
        requires = {
            "nvim-lua/plenary.nvim",
            "nvim-treesitter/nvim-treesitter",
            "antoinemadec/FixCursorHold.nvim",
            "nvim-neotest/neotest-python",
        }
    }

    -- debugger protocol
    use 'mfussenegger/nvim-dap'
    use 'mfussenegger/nvim-dap-python'
    use 'theHamsta/nvim-dap-virtual-text' -- in file variable inspection text
    use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} } -- complete debug UI
    use 'LiadOz/nvim-dap-repl-highlights' -- syntax highlighting in the dap REPL
    use 'rcarriga/cmp-dap' -- autocompletion in the dap REPL

    -- checking, doc, and completions
    use 'folke/neodev.nvim'

end)

local dap = require('dap')
require("neotest").setup({
    adapters = {
        require("neotest-python")({
            dap = {
                django = true,
                jinja = true,
                justMyCode = false,
                redirectOutput = true,
                showReturnValue = true,
            },
        }),
    }
})
require('dap-python').setup()

Any idea if this is a configuration issue, a bug in neotest or neotest python, something in the nvim-dap or nvim-dap-python side or even in debugpy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant