Merge branch 'stevearc:master' into feat-setup-view-options-add-is_excluded
This commit is contained in:
commit
c1ed4fad14
15 changed files with 295 additions and 78 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue