doc: provide more hints in netrw buffer warning (#148)
This commit is contained in:
parent
b24380c0e1
commit
a05b2eb54d
1 changed files with 6 additions and 2 deletions
|
|
@ -952,7 +952,11 @@ M.setup = function(opts)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
if vim.g.loaded_netrwPlugin ~= 1 and not config.silence_netrw_warning then
|
if
|
||||||
|
vim.g.loaded_netrwPlugin ~= 1
|
||||||
|
and not config.silence_netrw_warning
|
||||||
|
and config.default_file_explorer
|
||||||
|
then
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
desc = "Inform user how to disable netrw",
|
desc = "Inform user how to disable netrw",
|
||||||
group = aug,
|
group = aug,
|
||||||
|
|
@ -960,7 +964,7 @@ M.setup = function(opts)
|
||||||
once = true,
|
once = true,
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.notify(
|
vim.notify(
|
||||||
"If you expected an Oil buffer here, you may want to disable netrw (:help netrw-noload)\nSet `silence_netrw_warning = true` in oil.setup() to disable this message.",
|
"If you expected an Oil buffer here, you may want to disable netrw (:help netrw-noload)\nSet `default_file_explorer = false` in oil.setup() to not take over netrw buffers, or `silence_netrw_warning = true` to disable this message.",
|
||||||
vim.log.levels.WARN
|
vim.log.levels.WARN
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue