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

Virtual text isn't cleared 'on demand' #74

Open
igorlfs opened this issue Mar 7, 2024 · 3 comments
Open

Virtual text isn't cleared 'on demand' #74

igorlfs opened this issue Mar 7, 2024 · 3 comments

Comments

@igorlfs
Copy link

igorlfs commented Mar 7, 2024

Hey!

Thanks for the nice plugin :)

I'm having trouble hiding the virtual text. There is some discussion about this issue in another thread:

          Even `:DapVirualTextDisable` doesn't clear the virt text for me: no new text is produced, but the old text does not hide.

Originally posted by @crhf in #14 (comment)

From what I understand, reading the original discussion, is that the logic to hide the virtual text is coupled with nvim-dap's event system. Nonetheless, it would be nice if commands like :DapVirtualTextDisable and :DapVirtualTextToggle could actually hide the text.

@nishantpillai5
Copy link

+1

@TheLeoP
Copy link

TheLeoP commented May 21, 2024

You can add a command to do this:

vim.api.nvim_create_user_command(
  "DapVirtualTextClear",
  function() require("nvim-dap-virtual-text.virtual_text").clear_virtual_text() end,
  {
    desc = "Clear all the virtual text displayed by nvim-dap-virtual-text",
  }
)

@igorlfs
Copy link
Author

igorlfs commented May 21, 2024

Hey, @TheLeoP, thanks for the suggestion!

I decided to take a deeper look and noticed that reverting commit 57f1dbd fixes the issue. This commit should reduce flickering, but with my (very) limited testing, I haven't noticed any flickering.

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

3 participants