nvim-tree.lua/lua/lib/utils.lua
2020-08-06 11:51:28 +02:00

15 lines
340 B
Lua

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