update
parent
33aa97c9e0
commit
898a383d4d
@ -0,0 +1,33 @@
|
|||||||
|
local M = {}
|
||||||
|
|
||||||
|
-- config for dap ui virt text
|
||||||
|
local dap_ui_virt_text_config = {
|
||||||
|
enabled = true, -- enable this plugin (the default)
|
||||||
|
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
|
||||||
|
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
|
||||||
|
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
|
||||||
|
show_stop_reason = true, -- show stop reason when stopped for exceptions
|
||||||
|
commented = false, -- prefix virtual text with comment string
|
||||||
|
only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
|
||||||
|
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
|
||||||
|
filter_references_pattern = '<module', -- filter references (not definitions) pattern when all_references is activated (Lua gmatch pattern, default filters out Python modules)
|
||||||
|
-- experimental features:
|
||||||
|
virt_text_pos = 'eol', -- position of virtual text, see `:h nvim_buf_set_extmark()`
|
||||||
|
all_frames = true, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
|
||||||
|
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
|
||||||
|
virt_text_win_col = 60 -- position the virtual text at a fixed window column (starting from the first text column) ,
|
||||||
|
-- e.g. 80 to position at column 80, see `:h nvim_buf_set_extmark()`
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
M.setup_virt_text = function()
|
||||||
|
local ok, dap_virt_text = pcall(require, 'nvim-dap-virtual-text')
|
||||||
|
if not ok then
|
||||||
|
vim.notify("missing module nvim-dap-virtual-text", vim.log.levels.WARN)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
dap_virt_text.setup(dap_ui_virt_text_config)
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
@ -1,41 +1,9 @@
|
|||||||
-- local dap = require("dap")
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
local opts = {
|
local opts = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- config for dap ui virt text
|
|
||||||
local dap_ui_virt_text_config = {
|
|
||||||
enabled = true, -- enable this plugin (the default)
|
|
||||||
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
|
|
||||||
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
|
|
||||||
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
|
|
||||||
show_stop_reason = true, -- show stop reason when stopped for exceptions
|
|
||||||
commented = false, -- prefix virtual text with comment string
|
|
||||||
only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
|
|
||||||
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
|
|
||||||
filter_references_pattern = '<module', -- filter references (not definitions) pattern when all_references is activated (Lua gmatch pattern, default filters out Python modules)
|
|
||||||
-- experimental features:
|
|
||||||
virt_text_pos = 'eol', -- position of virtual text, see `:h nvim_buf_set_extmark()`
|
|
||||||
all_frames = true, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
|
|
||||||
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
|
|
||||||
virt_text_win_col = 60 -- position the virtual text at a fixed window column (starting from the first text column) ,
|
|
||||||
-- e.g. 80 to position at column 80, see `:h nvim_buf_set_extmark()`
|
|
||||||
}
|
|
||||||
|
|
||||||
M.setup = function()
|
M.setup = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
M.setup_virt_text = function()
|
|
||||||
local ok, dap_virt_text = pcall(require, 'nvim-dap-virtual-text')
|
|
||||||
if not ok then
|
|
||||||
vim.notify("missing module nvim-dap-virtual-text", vim.log.levels.WARN)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
P("setup dap ui virt text")
|
|
||||||
dap_virt_text.setup(dap_ui_virt_text_config)
|
|
||||||
end
|
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
Loading…
Reference in New Issue