Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lua/codesettings/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ function M.fqn(fname)
end

---strip off trailing slash, if any
---@param path string?
local function normalize_root(path)
-- if nil then return nil
if not path then
return path
end

if vim.endswith(path, '/') and path ~= '/' then
return path:sub(1, -2)
end
Expand Down