mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
treesitter: allow to force predicate addition
This commit is contained in:
parent
5900c99b7c
commit
6a8dcfab4b
@ -119,8 +119,8 @@ local predicate_handlers = {
|
|||||||
-- @param name the name of the predicate, without leading #
|
-- @param name the name of the predicate, without leading #
|
||||||
-- @param handler the handler function to be used
|
-- @param handler the handler function to be used
|
||||||
-- signature will be (match, pattern, bufnr, predicate)
|
-- signature will be (match, pattern, bufnr, predicate)
|
||||||
function M.add_predicate(name, handler)
|
function M.add_predicate(name, handler, force)
|
||||||
if predicate_handlers[name] then
|
if predicate_handlers[name] and not force then
|
||||||
a.nvim_err_writeln(string.format("Overriding %s", name))
|
a.nvim_err_writeln(string.format("Overriding %s", name))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user