virtual-text: inline variable values with sensible defaults

This commit is contained in:
swaits committed 2026-04-11 16:38:46 -06:00
1 parent 5ef0031ffe
commit 3729d333ff
2 files changed
+27

No files matched your search

+3
View File
@@ -1,6 +1,7 @@
local config = require("tiny-debugger.config")
local help = require("tiny-debugger.help")
local ui = require("tiny-debugger.ui")
local virtual_text = require("tiny-debugger.virtual_text")
local M = {}
@@ -107,6 +108,7 @@ function M.enter()
set_keymaps(buf)
set_cursor_highlight()
ui.open()
virtual_text.enable()
if config.opts.help_on_enter then
help.open()
@@ -122,6 +124,7 @@ function M.exit()
restore_cursor_highlight()
help.close()
ui.close()
virtual_text.disable()
end
function M.toggle()
+24
View File
@@ -0,0 +1,24 @@
local config = require("tiny-debugger.config")
local M = {}
local initialized = false
function M.setup()
if initialized then return end
initialized = true
require("nvim-dap-virtual-text").setup(config.opts.virtual_text)
end
function M.enable()
M.setup()
require("nvim-dap-virtual-text").enable()
end
function M.disable()
if initialized then
require("nvim-dap-virtual-text").disable()
end
end
return M