nvim-tree.lua/lua/lib/utils.lua
2020-12-27 19:14:34 +01:00

15 lines
341 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 '[NvimTree] "..msg:gsub("'", "''").."'")
api.nvim_command('echohl None')
end
return M