Merge branch 'stevearc:master' into feat-setup-view-options-add-is_excluded

This commit is contained in:
NWang 2023-03-19 07:09:48 +08:00 committed by GitHub
commit c1ed4fad14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 295 additions and 78 deletions

View file

@ -22,6 +22,8 @@ local default_config = {
conceallevel = 3,
concealcursor = "n",
},
-- Oil will take over directory buffers (e.g. `vim .` or `:e src/`
default_file_explorer = true,
-- Restore window options to previous values when leaving an oil buffer
restore_win_options = true,
-- Skip the confirmation popup for simple operations
@ -142,9 +144,12 @@ M.get_trash_url = function()
return M.adapter_to_scheme.files .. fs.os_to_posix_path(M.trash)
end
---@param scheme string
---@param scheme nil|string
---@return nil|oil.Adapter
M.get_adapter_by_scheme = function(scheme)
if not scheme then
return nil
end
if not vim.endswith(scheme, "://") then
local pieces = vim.split(scheme, "://", { plain = true })
if #pieces <= 2 then