Skip to content

Commit 7d49362

Browse files
committed
chore!: Deprecate global-level ignore_treesitter option - closes #100
1 parent 01c6b02 commit 7d49362

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

lua/debugprint/options.lua

+10-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ local GLOBAL_OPTION_DEFAULTS = {
2727
display_counter = true,
2828
display_snippet = true,
2929
move_to_debugline = false,
30-
ignore_treesitter = false,
3130
filetypes = require("debugprint.filetypes"),
3231
print_tag = "DEBUGPRINT",
3332
}
@@ -43,7 +42,6 @@ local validate_global_opts = function(o)
4342
display_counter = { o.display_counter, { "function", "boolean" } },
4443
display_snippet = { o.display_snippet, "boolean" },
4544
move_to_debugline = { o.move_to_debugline, "boolean" },
46-
ignore_treesitter = { o.ignore_treesitter, "boolean" },
4745
filetypes = { o.filetypes, "table" },
4846
print_tag = { o.print_tag, "string" },
4947
})
@@ -149,6 +147,16 @@ M.get_and_validate_global_opts = function(opts)
149147
end
150148
end
151149

150+
if opts["ignore_treesitter"] ~= nil then
151+
vim.deprecate(
152+
"`ignore_treesitter` option",
153+
"`*_alwaysprompt` keymappings",
154+
"4.0, see ':help debugprint.nvim-keymappings-and-commands' for more information",
155+
"debugprint.nvim",
156+
false
157+
)
158+
end
159+
152160
return global_opts
153161
end
154162

lua/debugprint/types.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
---@field display_counter? boolean
1414
---@field display_snippet? boolean
1515
---@field move_to_debugline? boolean
16-
---@field ignore_treesitter? boolean
1716
---@field filetypes? FileTypeConfig[]
1817
---@field print_tag? string
1918
---Deprecated
2019
---@field create_keymaps? boolean
2120
---@field create_commands? boolean
21+
---@field ignore_treesitter? boolean
2222

2323
---@class FunctionOptions
2424
---@field above boolean

0 commit comments

Comments
 (0)