doc: fix recipe for hiding gitignored files

This commit is contained in:
Steven Arcangeli 2024-08-30 17:10:53 -07:00
parent 0dc98d36b5
commit d10e7f442f

View file

@ -84,8 +84,8 @@ end
require("oil").setup({
view_options = {
is_hidden_file = function(name, _)
local dir = require("oil").get_current_dir()
is_hidden_file = function(name, bufnr)
local dir = require("oil").get_current_dir(bufnr)
local is_dotfile = vim.startswith(name, ".") and name ~= ".."
-- if no local directory (e.g. for ssh connections), just hide dotfiles
if not dir then return is_dotfile end