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

repl send scope variables to code file buffer instead of repl window #223

Closed
huyiqun opened this issue Jan 31, 2023 · 2 comments
Closed

Comments

@huyiqun
Copy link

huyiqun commented Jan 31, 2023

Thanks for the great plugin! I am using this for python debug and I ran into the following problem, not sure if I am missing any settings. When I have cursor in the scopes window and press r, which is mapped to send variable to repl, the variable is sent to code file buffer instead of the repl.

I have tried a couple of different config. Here is how to replicate: I am using https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua as the basic config, with these plugins added

use 'mfussenegger/nvim-dap'
use "jayp0521/mason-nvim-dap.nvim"
use 'mfussenegger/nvim-dap-python'
use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"}}
use 'theHamsta/nvim-dap-virtual-text'

for Packer and I added these lines for a simple setup:

local dap, dapui = require('dap'), require('dapui')
require("mason-nvim-dap").setup({
  ensure_installed = { "python" }
})

require('dap-python').setup('~/.pyenv/shims/python')

dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end

dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end

dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end

dapui.setup {
  element_mappings = {
    scopes = {
      repl = "r",
    },
  },
}

Let's say I put cursor on the this_is_a_list variable line in the scopes window and press r
image

It inserts this_is_a_list in the code buffer instead of sending it to the repl window (the lower right corner) for evaluation.
image

Am I missing anything here?

rcarriga added a commit that referenced this issue Jan 31, 2023
@rcarriga
Copy link
Owner

Ah it was an non-escaped pattern issue, should be working now 😄

@huyiqun
Copy link
Author

huyiqun commented Feb 3, 2023

working now, thanks for the fix!   😃

@huyiqun huyiqun closed this as completed Feb 3, 2023
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

2 participants