doc: fix recipe for hiding gitignored files
This commit is contained in:
parent
0dc98d36b5
commit
d10e7f442f
1 changed files with 2 additions and 2 deletions
|
|
@ -84,8 +84,8 @@ end
|
||||||
|
|
||||||
require("oil").setup({
|
require("oil").setup({
|
||||||
view_options = {
|
view_options = {
|
||||||
is_hidden_file = function(name, _)
|
is_hidden_file = function(name, bufnr)
|
||||||
local dir = require("oil").get_current_dir()
|
local dir = require("oil").get_current_dir(bufnr)
|
||||||
local is_dotfile = vim.startswith(name, ".") and name ~= ".."
|
local is_dotfile = vim.startswith(name, ".") and name ~= ".."
|
||||||
-- if no local directory (e.g. for ssh connections), just hide dotfiles
|
-- if no local directory (e.g. for ssh connections), just hide dotfiles
|
||||||
if not dir then return is_dotfile end
|
if not dir then return is_dotfile end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue