From d73500eaa6b25edf476d73d0d1a47c65043b6e88 Mon Sep 17 00:00:00 2001 From: Steven Sojka Date: Mon, 29 Jun 2020 09:58:51 -0500 Subject: refactor(refactor): use higher local apis and some cleanup --- lua/nvim-treesitter/utils.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lua/nvim-treesitter/utils.lua') diff --git a/lua/nvim-treesitter/utils.lua b/lua/nvim-treesitter/utils.lua index 41833f8c..f5c65a0a 100644 --- a/lua/nvim-treesitter/utils.lua +++ b/lua/nvim-treesitter/utils.lua @@ -45,7 +45,7 @@ function M.get_cache_dir() return nil, 'Invalid cache rights, $XDG_CACHE_HOME or /tmp should be read/write' end ---- Gets a property at path +-- Gets a property at path -- @param tbl the table to access -- @param path the '.' seperated path -- @returns the value at path or nil @@ -62,4 +62,10 @@ function M.get_at_path(tbl, path) return result end +-- Prints a warning message +-- @param text the text message +function M.print_warning(text) + api.nvim_command(string.format([[echohl WarningMsg | echo "%s" | echohl None]], text)) +end + return M -- cgit v1.2.3