diff options
Diffstat (limited to 'lua/nvim-treesitter/utils.lua')
| -rw-r--r-- | lua/nvim-treesitter/utils.lua | 8 |
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 |
