summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/utils.lua
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2021-10-22 16:25:18 -0500
committerStephan Seitz <stephan.seitz@fau.de>2021-10-22 23:46:16 +0200
commit55860a76d90009f742d9ee300879541ab13ed9f9 (patch)
treed224e33a6fa5be78dbc8a29e749e852154309806 /lua/nvim-treesitter/utils.lua
parent97819053c86df290bf62aeafeb4a0d6a23b7c6b8 (diff)
Use wrapper around vim.notify with common options
Ref https://github.com/nvim-treesitter/nvim-treesitter/pull/1927#issuecomment-947064843
Diffstat (limited to 'lua/nvim-treesitter/utils.lua')
-rw-r--r--lua/nvim-treesitter/utils.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/utils.lua b/lua/nvim-treesitter/utils.lua
index dcd1e135..e6a6358a 100644
--- a/lua/nvim-treesitter/utils.lua
+++ b/lua/nvim-treesitter/utils.lua
@@ -4,6 +4,12 @@ local luv = vim.loop
local M = {}
+-- Wrapper around vim.notify with common options set.
+function M.notify(msg, log_level, opts)
+ local default_opts = { title = "nvim-treesitter" }
+ vim.notify(msg, log_level, vim.tbl_extend("force", default_opts, opts or {}))
+end
+
function M.setup_commands(mod, commands)
for command_name, def in pairs(commands) do
local call_fn = string.format(