fix(dir): remove loaded plugin guard #40489

This commit is contained in:
Barrett Ruth
2026-06-30 06:54:36 -05:00
committed by GitHub
parent ab4e9683f5
commit 1b959ba485
4 changed files with 1 additions and 21 deletions

View File

@@ -71,11 +71,6 @@ after use: >vim
<
Use "wipe" to discard all buffer state; see 'bufhidden'.
*g:loaded_nvim_dir_plugin*
To disable this plugin, set this in your config before startup: >lua
vim.g.loaded_nvim_dir_plugin = 1
<
==============================================================================
Builtin plugin: difftool *difftool*

View File

@@ -1,8 +1,5 @@
--- @brief
--- Directory listing for `:edit <dir>`.
---
--- [g:loaded_nvim_dir_plugin]()
--- The plugin can be disabled by setting `g:loaded_nvim_dir_plugin = 1`.
local api = vim.api
local fs = vim.fs

View File

@@ -1,8 +1,3 @@
if vim.g.loaded_nvim_dir_plugin ~= nil then
return
end
vim.g.loaded_nvim_dir_plugin = true
local api = vim.api
local nvim_on = require('vim._core.util').nvim_on

View File

@@ -352,7 +352,7 @@ describe('nvim.dir', function()
eq('', api.nvim_get_option_value('filetype', { buf = 0 }))
end)
it('coexists with netrw and can be disabled', function()
it('coexists with netrw', function()
if t.is_zig_build() then
return pending('broken with build.zig relative runtime paths after chdir')
end
@@ -368,13 +368,6 @@ describe('nvim.dir', function()
command('Explore .')
cd(cwd)
eq('netrw', api.nvim_get_option_value('filetype', { buf = 0 }))
n.clear({
args_rm = { '-u' },
args = { '--cmd', 'let g:loaded_nvim_dir_plugin = 1' },
})
edit(root)
eq('netrw', api.nvim_get_option_value('filetype', { buf = 0 }))
end)
it('supports the FileExplorer browse contract', function()