Print warning when git state is not recognized.

This commit is contained in:
Kristijan Husak
2020-08-06 11:48:00 +02:00
committed by Kiyan Yazdani
parent 9cad30f1be
commit 62846b1e31
2 changed files with 16 additions and 1 deletions

View File

@@ -1,7 +1,14 @@
local M = {}
local api = vim.api
function M.path_to_matching_str(path)
return path:gsub('(%-)', '(%%-)'):gsub('(%.)', '(%%.)'):gsub('(%_)', '(%%_)')
end
function M.echo_warning(msg)
api.nvim_command('echohl WarningMsg')
api.nvim_command("echom '[LuaTree] "..msg:gsub("'", "''").."'")
api.nvim_command('echohl None')
end
return M