feat: API to change config.view.is_hidden_file at runtime (#69)
This commit is contained in:
parent
33d5701a8d
commit
12bea0f646
5 changed files with 53 additions and 6 deletions
|
|
@ -135,6 +135,17 @@ M.set_columns = function(cols)
|
|||
require("oil.view").set_columns(cols)
|
||||
end
|
||||
|
||||
---Change how oil determines if the file is hidden
|
||||
---@param is_hidden_file fun(filename: string, bufnr: nil|integer): boolean Return true if the file/dir should be hidden
|
||||
M.set_is_hidden_file = function(is_hidden_file)
|
||||
require("oil.view").set_is_hidden_file(is_hidden_file)
|
||||
end
|
||||
|
||||
---Toggle hidden files and directories
|
||||
M.toggle_hidden = function()
|
||||
require("oil.view").toggle_hidden()
|
||||
end
|
||||
|
||||
---Get the current directory
|
||||
---@return nil|string
|
||||
M.get_current_dir = function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue