chore: rename lib folder to nvim-tree
Allows external access to the lua api and follow neovim plugins better practices
This commit is contained in:
14
lua/nvim-tree/utils.lua
Normal file
14
lua/nvim-tree/utils.lua
Normal file
@@ -0,0 +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 '[NvimTree] "..msg:gsub("'", "''").."'")
|
||||
api.nvim_command('echohl None')
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user