summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/utils.lua
diff options
context:
space:
mode:
authorSteven Sojka <Steven.Sojka@tdameritrade.com>2020-06-29 09:58:51 -0500
committerKiyan Yazdani <yazdani.kiyan@protonmail.com>2020-06-30 08:21:01 +0200
commitd73500eaa6b25edf476d73d0d1a47c65043b6e88 (patch)
treee44533f9c8ac12d91f841bc53423fde3d0119939 /lua/nvim-treesitter/utils.lua
parent6f8e4c97a4f99b1a04cca5c41c333ffb5337d84a (diff)
refactor(refactor): use higher local apis and some cleanup
Diffstat (limited to 'lua/nvim-treesitter/utils.lua')
-rw-r--r--lua/nvim-treesitter/utils.lua8
1 files changed, 7 insertions, 1 deletions
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