mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 19:34:15 +00:00
Added 2 options for nix compatibility
Fully backwards compatible with minimal runtime impact dev.extra_paths and performance.rtp.override_base_rtp
This commit is contained in:
parent
96584866b9
commit
5f41e57c5e
4 changed files with 70 additions and 6 deletions
|
@ -64,6 +64,19 @@ function M.norm(path)
|
|||
return path:sub(-1) == "/" and path:sub(1, -2) or path
|
||||
end
|
||||
|
||||
---@return table | nil
|
||||
function M.norm_list(list)
|
||||
if M.is_list(list) then
|
||||
local normalized_paths = {}
|
||||
for k, path in ipairs(list) do
|
||||
table.insert(normalized_paths, k, M.norm(path))
|
||||
end
|
||||
return normalized_paths
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
|
||||
---@param opts? {level?: number}
|
||||
function M.pretty_trace(opts)
|
||||
opts = opts or {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue