mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
12 lines
288 B
Lua
12 lines
288 B
Lua
local M = {}
|
|
|
|
--TODO(clason): replace by vim.fs._join_paths
|
|
function M.join_path(...)
|
|
return (table.concat({ ... }, '/'):gsub('//+', '/'))
|
|
end
|
|
|
|
function M.get_package_path(...)
|
|
return M.join_path(vim.fn.fnamemodify(debug.getinfo(1, 'S').source:sub(2), ':p:h:h:h'), ...)
|
|
end
|
|
|
|
return M
|